You may also want to read through the "Redux Fundamentals" tutorial, which will give you a complete understanding of how Redux works, what Redux Toolkit does, and how to use it correctly. We recommend going through the full "Redux Essentials" tutorial, which covers all of the key pieces included in Redux Toolkit, what problems they solve, and how to use them to build real-world applications. Here's the complete counter application as a running CodeSandbox: What's Next? Get the dispatch function with the useDispatch hook, and dispatch actions as needed.Read data from the store with the useSelector hook. Use the React-Redux useSelector/useDispatch hooks in React components.Export the generated slice reducer and action creators.Reducer functions may "mutate" the state using Immer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |