Why thunk is used in react?

Redux Thunk is a middleware that allows you to call the action creators that return a function(thunk) which takes the store’s dispatch method as the argument and which is afterwards used to dispatch the synchronous action after the API or side effects has been finished.21 Ara 2020

Read more

What is thunk function?

In computer programming, a thunk is a subroutine used to inject a calculation into another subroutine . Thunks are primarily used to delay a calculation until its result is needed, or to insert operations at the beginning or end of the other subroutine.

Read more

Why do we need redux Persist?

One of the best features of the redux persists is that it provides us with the PersistGate — it helps us to delay the rendering until the state has been retrieved and saved to redux . Here we can show loading components until our state gets the persisted value. 2. Another great feature it provides Blacklist & Whitelist.

Read more