You shouldn't really use the DOM in React since there isn't a real DOM.
Better to create a state to hold the data, give each input an onChange function which adds to the state and then do a Post request with that final state
Also adding an error state might be useful for showing users an error e.g. if user already exists
E.G. (this isn't tested but we've done a similar thing)
You shouldn't really use the DOM in React since there isn't a real DOM.
Better to create a state to hold the data, give each input an onChange function which adds to the state and then do a Post request with that final state
Also adding an error state might be useful for showing users an error e.g. if user already exists
E.G. (this isn't tested but we've done a similar thing)
Post-fetch.js
Also could pass the error from postFetch function as part of the response to the loginForm
Disclaimer: I looked at this for 30mins, but I have not tested this. This may or may not ruin everything