Search⌘ K
AI Features

What is a Redux Action?

Explore how Redux actions represent intents to update application state by using plain JavaScript objects. Understand the importance of the type field and the use of additional data in the payload to fully describe actions before they are processed by reducers.

We'll cover the following...

When you walk into a bank, the Cashier receives your action i.e intent for coming into the bank. In our previous example, we called this WITHDRAWAL_MONEY. The only way money leaves the bank Vault, is if you make your action i.e intent known to the Cashier.

Now, the same goes for the Redux Reducer. Unlike setState() in pure React, the only way you update the state of a Redux application, is if you make your intent known to the ...