-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Issue:
While submitting form data to the json-server, the page is unexpectedly reloading instead of performing a seamless data submission. This behavior disrupts the user experience and results in data loss or duplication.
Steps to Reproduce:
Navigate to the form submission page.
Fill in the form with valid data.
Click the submit button.
Observe that the entire page reloads instead of just sending a POST request to the json-server.
Expected Behavior:
The form data should be submitted to the json-server via an asynchronous POST request without reloading the entire page.
The user should receive a confirmation or error message based on the server response.
Actual Behavior:
The page reloads, causing the input data to be cleared and interrupting the flow.
Form created using React.js ,Typescript , Formik ,Yup validation and Json server