this photo in chrome
When using Axios to send data from a React frontend to a backend API, it’s important to ensure that the asynchronous behavior is properly handled. The issue of promise pending after clicking the signup button despite using async/await could be caused by various factors such as improperly handled promise returns from the Axios request or issues with the request itself. It’s important to thoroughly review the code where the Axios request is made to ensure it is correct and that the async/await keywords are used appropriately. Additionally, checking the network requests using browser developer tools can help identify if the POST request is being made and if there are any errors in the responses. Handling all possible errors inside the asynchronous function is essential to prevent exceptions and ensure expected behavior. By following these best practices and thoroughly reviewing the code, you should be able to identify and resolve the issue with the signup button Axios request
Tirumalareddy Sai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.