You are on page 1of 10
Single source of Truth The global state of your application is stored as an object inside a single store. State is Read-Only The only way to change the state is to dispatch an action Immutability, One-way data flow, Predictability of outcome Changes are Made with Pure Reducer Functions REDUX Principles 3. Store The Redux store brings together the state, actions, and reducers that make up your app. It's important to note that youll only have a single store in a Redux application. = Every Redux store has a single root reducer function 2. Reducer Reducers are functions that take the as arguments, and return a result. in. type) retl retl Peet and an cy action) @ © 1.1 Action Creator © | 1. Action Pure Object * 01 INCREMENT When user click on Increment button. DECREMENT When user click on Decrement button. © 1. Action Pure Object Actions are plain JavaScript objects that have a type field. Actions only tell what to do, but they don't tell how fo do Vs REDUX Main Topics ACTION REDUCER What to do? How to do? STORE Functions associated object which holds the with Store state of the application createStore() What is REDUX? Redux is a pattern and library for managing and updating application state, using events called "actions’. It serves as a centralized store for state that needs to be used across your entire application, with rules ensuring that the state can only be updated in a predictable fashion. In React Hooks (context API, useContext) Without Context Consumer

You might also like