You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is an action creatorconstincrement=createAction();// Which is actually just a function returning the action object when calledconstaction=increment(42);// The action will look like// { type: '[1]', payload: 42}
If we were doing standard redux, you would then do:
But using redux-act, we assume that you want to let the lib handle the type on its own so it will extract the payload and give it to you directly inside the reducer:
So you do not have access to the full action object, just the data inside its payload key. It should be enough in 90% use cases. If, for whatever reason, you need the full action object, you can disable the payload extraction by setting the payload option to false.
Sorry, but I didn't understand how to use that.
Can you please give an example ?
Thanks!
The text was updated successfully, but these errors were encountered: