This topic explains about redux and have briefly described its important aspects which are very helpful to understand and proceed with it further.
Three Core Concepts:
Store:- That holds the state of your application.
Action:- That describes the changes in the state of the application.
Reducer:- Which actually carries out the state transition depending on the action.
First Principle:- The state of your whole application is stored in an object tree within a single store.
Maintain our application state in a single object which would be managed by the redux store.
Second Principle:- The pnly way to change the state is to emit an action, an object describing
what happend. To update the state of your app, you need to let redux know about that with an action.
Not allowed to directly update the state object.
Three principle:- To specify how the state tree is transformed by action, you write pure reducers.
Is the suggested way to extend Redux with custom functionality.
Provides a third-party extension point between dispatching an action, and the moment it reaches the reducer.
Use middleware for logging, crash reporting, performing asynchronous tasks etc.
Asynchronous API calls to fetch data from an endpoint and use that data in your application.
Define async action creators.
React Redux + Hooks:
React redux pattern
Action creators, reducers, provide the store and connect the components.
Components can access state and dispatch actions
React Redux v7.1
Subscribe to store and dispatch actions without connect()
Used for debugging.
Below topics are just to keep in mind and will explain later separately.