MERN JWT Auth Backend
MERN JWT Auth is a fully MERN application. In this version we have implement the frontend of the application using React.
Release Notes:
- Set up the frontend using
create-react-app
- Created static
components
for the Navbar, Landing, Login and Register pages - Setup
Redux
for global state management - Link
Redux
to with the components - Display errors from our backend in the
React
forms - Create protected routes (pages only certain users can access based on their authentication)
- Keep a user logged when they refresh or leave the page (in other words, until they either logout or the
jwt
expires)
Installed Packages:
- Install axios because it is promise based HTTP client for making requests to our backend.
- Install classnames package as it is used for conditional classes in our JSX.
- Install jwt-decode package as it is used to decode our JWT so we can get user data from it.
- Install react-redux package as it allows us to use Redux with React.
- Install react-router-dom package and it is used for routing purposes.
- Install redux package as it is used to manage state between components.
- Install redux-thunk package because it is a middleware for Redux that allows us to directly access the dispatch method to make asynchronous calls from our actions.