How to do redux … in 3 steps

Step 1: Define a Constant (constants.js file somewhere in your code)

Step 2: Define an Action Creator (basically a function) to return a plain JavaScript object in form of:

type: <your previously defined type in constants.js>,
data: <your wanted data>

Step 3: Define a Reducer, which will response to your `action`, which is created from Step#2’s Action Creator


Show your support

Clapping shows how much you appreciated Toan Tran’s story.