3 回答

慕村9548890
TA貢獻1884條經驗 獲得超4個贊

森欄
TA貢獻1810條經驗 獲得超5個贊
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
});
};
}
添加回答
舉報
0/150
提交
取消