5/8/2023 0 Comments Reduxjs toolkit thunk![]() The function itself has toString() defined, so that it can be used in place of the type constant. ![]() A createAction() utility that returns an action creator function for the given action type string.In addition, it automatically uses the immer library to let you write simpler immutable updates with normal mutative code, like = true. A createReducer() utility that lets you supply a lookup table of action types to case reducer functions, rather than writing switch statements.It can automatically combine your slice reducers, adds whatever Redux middleware you supply, includes redux-thunk by default, and enables use of the Redux DevTools Extension. A configureStore() function with simplified configuration options.It does not address concepts like "reusable encapsulated Redux modules", data fetching, folder or file structures, managing entity relationships in the store, and so on. This package is not intended to solve every possible use case for Redux, and is deliberately limited in scope. We can't solve every use case, but in the spirit of create-react-app and apollo-boost, we can try to provide some tools that abstract over the setup process and handle the most common use cases, as well as include some useful utilities that will let the user simplify their application code. "Redux requires too much boilerplate code"."I have to add a lot of packages to get Redux to do anything useful"."Configuring a Redux store is too complicated".It was originally created to help address three common concerns about Redux: The Redux Toolkit package is intended to be the standard way to write Redux logic. Npm install known as "Redux Starter Kit") Purpose The official, opinionated, batteries-included toolset for efficient Redux development
0 Comments
Leave a Reply. |