RTK Query mutuation data returns undefined when logged to console

Viewed 27

Hey guys please assist.

I am trying to handle a post request using RTKQuery. Data gets posted successfully and returns necessary response.

The issue now is, i can't see the response data from the mutation. the data variable meant for the response data returns undefined but when i check the network tab i can see the response data and status. I really don't know what's wrong.

here's the mutation file enter image description here

registered the service in the store

enter image description here

the actual sign up component. the signData should contain the response data instead it's undefined. console.log(signupData); should return the api response.instead, console.log(signData); returns undefined

enter image description here

Please assist...

0 Answers
Related