#62 React Native Redux Middleware | Redux Tutorial | Part 7

preview_player
Показать описание
Middleware is the suggested way to extend Redux with custom functionality. Middleware lets you wrap the store's dispatch method for fun and profit. The key feature of middleware is that it is composable. Multiple middleware can be combined together, where each middleware requires no knowledge of what comes before or after it in the chain.

The most common use case for middleware is to support asynchronous actions without much boilerplate code or a dependency on a library like Rx. It does so by letting you dispatch async actions in addition to normal actions.

For example, redux-thunk lets the action creators invert control by dispatching functions. They would receive dispatch as an argument and may call it asynchronously. Such functions are called thunks. Another example of middleware is redux-promise. It lets you dispatch a Promise async action, and dispatches a normal action when the Promise resolves.

Middleware is not baked into createStore and is not a fundamental part of the Redux architecture, but we consider it useful enough to be supported right in the core. This way, there is a single standard way to extend dispatch in the ecosystem, and different middleware may compete in expressiveness and utility.
---------------------------------------------------------------------------------------------------------------------------
#ReduxMiddleware #Middleware #ReduxTutorial #WhyMiddleware #ReduxComposeMiddleware #MultipleMiddleware #ApplyMiddleware #ReactNativeTutorials #ReactNative
---------------------------------------------------------------------------------------------------------------------------
Thanks for watching my video. I am trying to do my best, trying to provide best.
Subscribe & press bell icon to get notifications.

Join us on following social networks :
Рекомендации по теме
Комментарии
Автор

I really loved every of your work,

would really love to learn more from you on "OFFLINE FIRST approach"

using Redux, persist(read), redux-offline(write), Realm - consuming REST :)

Thank you :) ❤from india.

kashyapkarkar