Relative Content

Tag Archive for reactjsmern

MERN: Why am I getting a 404 when submitting a React form using createBrowserRouter and an action()?

I am submitting a form that adds book data to MongoDB. Using Thunder Client, I see the backend is working and the data is added to the database. When I submit my form in the frontend, using createBrowserRouter and an action(), I get a 404.
The form data is being captured, and as far as I can see, absolutely everything is in place. The data should be stored. I have tried for 2 days now and cannot get over this hump. I am hoping someone would look at the code and easily see where the issue is.