Redux
REDUX : 1. Explain flow of redux : 1. Action An action is a plain JavaScript object that describes a change or an event that occurred in the application. It has a type property (a string that indicates the action) and can optionally have a payload property (additional data needed to perform the action). Example of an Action: const addItemAction = { type : 'ADD_ITEM' , payload : { id : 1 , name : 'Book' } }; 2. Dispatch To initiate a change, an action must be sent to the Redux store using the dispatch function. The dispatch function is a method provided by the Redux store, and it's the only way to trigger a state change. Example of Dispatching an Action: store. dispatch (addItemAction); 3. Reducer Reducers are pure functions that determine how the state of the application changes in response to an action. A reducer takes the current state and an action as arguments and returns a new state. Example of a Reducer: const initialState = { items : []...