This is just a simple mental model that helps me understand how redux works.

Photo by NeONBRAND on Unsplash

Store — let’s imagine that this is a supermarket. Customers buy something here, and some people have to serve this store (perform some actions/changes) in accordance with the working protocol.

Photo by Torbjørn Helgesen on Unsplash

Action — just a piece of paper, describes what to do in the shop. In other words, it is a todo list for supermarket workers.

Action creator — template of regular actions, just because it’s annoying to write the same action every time you need to change something in the supermarket.

Photo by Super Straho on Unsplash

Dispatch — the person who takes a description of a task (action document) and delivers it to the reducer man.

Photo by Ivan Henao on Unsplash

Reducer — the person, who takes an action, reads what does he need to do, and does it.

So this is a simple metaphor that I created for myself to better understand how does redux works. Hope it will help somebody too.

Frontend Developer