4 回答

TA貢獻(xiàn)1853條經(jīng)驗 獲得超18個贊
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
});
};
}

TA貢獻(xiàn)1816條經(jīng)驗 獲得超4個贊
react為什么在github上很火爆,不就是因為他比其他框架優(yōu)越很多嗎,F(xiàn)acebook團(tuán)隊看不上別人開發(fā)的js引擎,所以自己開發(fā)了這一款,并且和angular一起被譽為下一代web技術(shù),豈是Arttemplate能比的,也許從簡單頁面的速度上來說,Arttemplate可能給人的感覺是速度切換的快,但是在中端和高端web中,react的速度優(yōu)勢就很明顯了,你想想Facebook的用戶有多少,能支持這么多用戶的js引擎,絕對不會差
添加回答
舉報