Redux Thunk is middleware that allows you to return functions, rather than just actions, within Redux . This allows for delayed actions, including working with promises. One of the main use cases for this middleware is for handling actions that might not be synchronous, for example, using axios to send a GET request.
Read moreWhat is the use of Applymiddleware?
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.
Read moreWhy is it called a thunk?
The term originated as a whimsical irregular form of the verb think . It refers to the original use of thunks in ALGOL 60 compilers, which required special analysis (thought) to determine what type of routine to generate.
Read moreHow do you use thunk?
A ‘thunk’ is a concept that can help with this situation.
Read more