Training program
Introduction to Redux-Based Architecture
- Overview of unidirectional data flow in React
- Why global state management is needed in larger applications
- Identifying problems caused by prop drilling and fragmented state
Installing and Configuring Redux in a React Application
- Installing `redux` and `react-redux`
- Creating the `store` folder and structuring the application around Redux
- Configuring the `store` and integrating it into the app using `Provider`
Creating Reducers and Actions
- What a reducer is and how it works
- Creating actions — synchronous and asynchronous actions
- Using `combineReducers` to manage multiple reducers
Using Selectors and Mapping State to Components
- Accessing global state with `useSelector`
- Mapping state to props using `mapStateToProps`
- Examples of computed selectors (memoization with `reselect`)
Dispatching Actions and Updating State
- Using `useDispatch` to trigger actions from functional components
- Mapping actions to props in class components using `mapDispatchToProps`
- Handling asynchronous operations with `redux-thunk` or `redux-saga`
Redux Middleware and Extensions
- Introduction to middleware: what it does and when to use it
- Using `redux-logger` for debugging
- Introducing and implementing `redux-thunk` or `redux-saga` for managing side effects
Structuring Large Redux Applications
- Modularizing the application: duck pattern and feature-based structure
- Dynamically loading reducers: lazy reducer loading
- Managing complex state using data normalization
Debugging and Testing Redux Applications
- Using Redux DevTools to track state changes and actions
- Writing unit tests for reducers and actions with `jest`
- Testing Redux-connected components with `react-testing-library`
Optimizing Performance in Redux Applications
- Using `React.memo` and `useMemo` to prevent unnecessary re-renders
- Memoizing selectors with `reselect`
- Performance analysis with tools like `why-did-you-render`
Alternatives to Redux and the Future of State Management
- Brief introduction to the Context API as an alternative to Redux
- Other state management libraries such as MobX or Zustand
- New trends: Redux Toolkit and reducing Redux boilerplate