# Unable to register users

**URL:** <https://forum.codewithmosh.com/t/unable-to-register-users/442>\
**Category:** React Native\
**Created:** [November 2, 2020, 11:27am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442 "2020-11-02T11:27:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![fran](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@fran](https://forum.codewithmosh.com/u/fran)\
**Post date:** [November 2, 2020, 11:27am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/1 "2020-11-02T11:27:58Z")

</div>

I’m doing the React Native advanced concepts course, I’m on the Implementing the Registration video and I’m getting an undefined when printing out the result const.  
Is this happening because we don’t have any “post” method on the client.js ?

 ![Screenshot 2020-11-02 at 12.18.42](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/5093591a31aa6518367772106d81c43197d9d819.png)

---

<div class="post-metadata">

**Author:** ![fran](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@fran](https://forum.codewithmosh.com/u/fran)\
**Post date:** [November 2, 2020, 11:30am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/2 "2020-11-02T11:30:00Z")

</div>

![Screenshot 2020-11-02 at 12.19.17](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/9e87d666708f01a61cb59399dc00a02ded22b46a.png)

---

<div class="post-metadata">

**Author:** ![fran](https://avatars.discourse-cdn.com/v4/letter/f/a4c791/32.png) [@fran](https://forum.codewithmosh.com/u/fran)\
**Post date:** [November 2, 2020, 11:30am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/3 "2020-11-02T11:30:32Z")

</div>

No post method

 ![Screenshot 2020-11-02 at 12.32.51](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/1X/1c8fd26abab0715292ceeba779f591d8e2fe370b.png)

---

<div class="post-metadata">

**Author:** ![ishakmohmed](https://avatars.discourse-cdn.com/v4/letter/i/ee59a6/32.png) [@ishakmohmed](https://forum.codewithmosh.com/u/ishakmohmed)\
**Post date:** [March 22, 2021, 2:59pm UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/4 "2021-03-22T14:59:58Z")

</div>

I faced the same error too. The quick fix could be to make sure your handleSubmit() looks exactly like this \>\>\>

const handleSubmit = async (userInfo) =\> {

```
// userInfo is the object that formik gives us!

const result = await registerApi.request(userInfo);

if (!result.ok) {

  if (result.data) setError(result.data.error);

  else {

    setError("An unexpected error occurred.");

    console.log(result);

  }

  return;

}

// if registration is successful, log them in right away!

const { data: authToken } = await authApi.login(

  userInfo.email,

  userInfo.password

);

auth.logIn(authToken);

```

};

---

<div class="post-metadata">

**Author:** ![ekbck](https://avatars.discourse-cdn.com/v4/letter/e/76d3ee/32.png) [@ekbck](https://forum.codewithmosh.com/u/ekbck)\
**Post date:** [November 27, 2021, 2:23pm UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/6 "2021-11-27T14:23:51Z")

</div>

Tagging on on this post if you don’t mind!

I had a different problem where I would get a response from the API saying **“name” is required** as an error message at the top of the form. Turns out I was missing **…args** in the apiFunc in useApi.js. Took me two hours to find it so I thought I’d share, because no one else here has had the same problem

---

<div class="post-metadata">

**Author:** ![Thiru13](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/thiru13/32/3092_2.png) [@Thiru13](https://forum.codewithmosh.com/u/Thiru13)\
**Post date:** [February 22, 2022, 6:19am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/7 "2022-02-22T06:19:33Z")

</div>

Hello @ekbck , I’m still having this issue… May I know are there any other alternatives?

---

<div class="post-metadata">

**Author:** ![Asotes](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@Asotes](https://forum.codewithmosh.com/u/Asotes)\
**Post date:** [April 22, 2022, 7:42pm UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/8 "2022-04-22T19:42:41Z")

</div>

[forexpave@gmail.com](mailto:forexpave@gmail.com) please send me message on this email

---

<div class="post-metadata">

**Author:** ![IrinaIv](https://avatars.discourse-cdn.com/v4/letter/i/22d042/32.png) [@IrinaIv](https://forum.codewithmosh.com/u/IrinaIv)\
**Post date:** [April 29, 2022, 2:56am UTC](https://forum.codewithmosh.com/t/unable-to-register-users/442/9 "2022-04-29T02:56:49Z")

</div>

Hi guys,  
I have the same issue: couldn’t register a new users: no any errors, nothing. How did you resolve this? Thank you!
