Understanding Actions in Redux Toolkit
In Redux Toolkit, actions are plain JavaScript objects that describe what event has occurred and how the state should change. Each action must have a `type` field, and optionally, a `payload` that carries additional data.
Key Points About Actions
- Actions are automatically created for each reducer defined inside `createSlice()`.
 - Each action’s `type` is generated by combining the slice name and reducer name (e.g., `counter/increment`).
 - Actions can be dispatched to trigger state updates through reducers or extraReducers.
 
Example: Auto-Generated Actions in Redux Toolkit