Git Product home page Git Product logo

saieswar15 / redux-middleware-routing Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 5 KB

Syntax practice of Redux, Redux Toolkit, React Router DOM, Middleware by Counter app as example

Home Page: https://codesandbox.io/s/github/SaiEswar15/redux-middleware-routing

HTML 33.63% JavaScript 65.11% CSS 1.26%
configurestore createslice react react-router-dom-v6 redux redux-toolkit usedispatch useselector

redux-middleware-routing's Introduction

redux-middleware-routing

Created with CodeSandbox

This is a syntax writing practice of

  1. redux
  2. redux toolkit
  3. configuring store using {configureStore}
  4. creating slices using {createSlice}
  5. creating reducer
  6. using the states using {useSelector}
  7. dispatching actions into the reducer using {useDispatch}
  8. creating router
  9. providing paths to all the the pages using {createBrowserRouter}
  10. providing links to all the pages using {Link}
  11. providing outlet for the children pages using {Outlet}
  12. making routes available to all the pages by using {RouterProvider}
  13. making store available to all the webpages by wrapping the index.js using {Provider}
  14. creating thunks manually so that they enter middleware instead of reducer.

Note : This uses the react-router-dom v6.10 so the concepts of {BrowserRouter, Routes, Route, Redirect} does not work in this version. there is also no concept of {Switch} which you see in many tutorials. It is very old concept in v6.

Feature : If you still want to do by the method of you should use the createRoutesFromElements

redux-middleware-routing's People

Contributors

saieswar15 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.