This will be helpful for those who are looking for login-registration reference which is build using MERN stack..
to install all the dependencies
to run the app
MongoDB as a database for storing users credentials. Express: A back-end web application framework Nodejs A cross-platform JavaScript runtime environment React: A JavaScript library for building user interfaces Use of React and its Component and Adding Lifecycle Methods to a Class.
Use of JWT authentication bcrypt for hashing password userdata along with token is saved to localstorage to remember user after sucesful login and when the user comes back its login logout deletes localstorage. errors are displayed as fielderrors and login,register error.