react+redux 頁面多的話文件會不會很大
請問這個react+redux 頁面多的話文件會不會很大?
慕蓋茨4494581
2019-09-17 17:12:44
TA貢獻1865條經驗 獲得超7個贊
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
});
};
}
舉報