- Blog website - Helds Dashboard, Home , Create and Edit page
- Home - Approved blogs - Listed blogs which has been approved from Dashboard
- Dashboard - Created blogs will be listed out in the table with ststus and actions - Axios - Get method used
- Create - Blogs can be created here - Axios - post method used
- Edit - Blogs can be edited - Axios - put method used
- Delete - Axios - delete method used
- All hooks has been used here except useLocation
- Dependencies need to be install - Axios , Toastify , react-bootstrap, react-router-dom
- Routes are used in the form of array with createBrowserRoutes
-> Redux tool used here -> Implementing React Redux
- npm install @reduxjs/toolkit react-redux
- Creating the Store
- Provide the Redux Store to React in main.jsx
- Create a Redux State Slice a. Set Name, Initial state b. Define all your reducers c. Export the Actions and Reducer of the State Slice
- Import reducer and add it in the store
- Install Redux dev tools in chrome as extentions
- Use the reducers wherever required in component
- Use useSelector to get your state
- Use useDispatch to call your actions