Why is thunk used?

The thunk can be used to delay the dispatch of an action, or to dispatch only if a certain condition is met . If Redux Thunk middleware is enabled, any time you attempt to dispatch a function instead of an action object, the middleware will call that function with dispatch method itself as the first argument.

Sizin İçin Seçtik  Why is Binance shutting down?

Leave a Reply

Your email address will not be published. Required fields are marked *