This repostory is about Redux and a simple second app in order to understand Redux functionality. It is a second part part of a practice module about Redux from Udemy's course React - The Complete Guide (incl Hooks, React Router, Redux)
.
https://www.udemy.com/course/react-the-complete-guide-incl-redux/
http://redux-tutorial.nicolasfernandez.online/
- Use of
@reduxjs/toolkit
andreact-redux
- Put in practice
store
,actions
,reducers
and how to apply those concepts with@reduxjs/toolkit
throughconfigureStore
andcreateSlice
. - Apply multiples stores and combine them into
configureStore
. - Where should our logic (code) go?
- Synchronous, side effect free (i.e data transformation): The code should be placed into
reducers
avoiding toaction creators
orComponents
. - Asynchrous code or with side-effects: The code should be placed inside the
components
oraction creators
.
- Synchronous, side effect free (i.e data transformation): The code should be placed into
- How to connect Redux with
side effects
andasynchronous
code.- How to implement when
side effects
andasynchronous
code is necessary due toReducers
must be pure, side-effect free, asynchronous functions. - Two main options learned:
- Inside the
components
. - Inside the
actions creators
.
- Inside the
- How to implement when
- Use of Firebase for the data persistence.
- Use of
Thunk Action Creators
.- A
Thunk
is a function that delays an action until later or something else finish. An action creatir function that does NOT return the action itself but another function which eventually returns the action.
- A
- Redux TookKits.