4 回答

搖曳的薔薇
TA貢獻1793條經驗 獲得超6個贊
actions:
export const getMenu = () => { return async (dispatch) => { let msg = await fetch('data/nodes',{
method: 'POST', //body: JSON.stringify({"aa":"aa"}),
header: {'content-type':'application/json; charset=utf-8'}
}).then((res)=>res.json()); var state = { nodes: msg };
dispatch({ type: 'INIT',
state
});
};
}
- 4 回答
- 0 關注
- 712 瀏覽
添加回答
舉報
0/150
提交
取消