Redux an Overview PT 3

Jaskomal
1 min readJul 4, 2021

--

Continuing the broad overview series on Redux in this final part of the blog we will go over the store in Redux. In Redux the store is where State is contained, this is also the place where dispatch actions are well dispatched when the reducer is called. Let’s take a look at how data flows after we have incorporated a store.

  1. Store will initialize the state with a value.
  2. The view will display the state to the User
  3. The user will interact with the view for example clicking a button
  4. This will dispatch an action to the store
  5. This action and the state will be combined in the reducer and the next state will be determined from the information
  6. The new state will be displayed to the user in the view
  7. Notice how the data still flows in one way.

To summarize the state renders the UI, when users interact with the UI an action, which contains information about what change is wanted, is dispatched to the store. Inside the store a reducer function takes in the action, and the current state as inputs. The view/UI will be re-rendered with the updates. Once the user makes another interaction the process will run again.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response