📜  redux 工作流程 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:29.850000             🧑  作者: Mango

代码示例1
First we go to the component
    Set up all inputs
    Dispatch something (some action) and pass in what parameters you need
Then go to actions
    Action will make call to API
API
    Makes some crud request (eg. post) and recieves something in return, which is then destructured in our action
Back in actions
    Dispatch, passing in type and data we want to send to the reducer