代碼:var React = require('react');
React.render(<div>test</div>,
document.getElementById('box')
);怎么會(huì)報(bào)Warning: React.render is deprecated. Please use ReactDOM.render from require('react-dom') instead.
3 回答

慕田峪4524236
TA貢獻(xiàn)1875條經(jīng)驗(yàn) 獲得超5個(gè)贊
var React = require('react'); var ReactDOM = require('react-dom'); ReactDOM.render( <div>test</div>, document.getElementById('box')
添加回答
舉報(bào)
0/150
提交
取消