第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

React.createClass is not a function

React.createClass is not a function

LGX_TvT 2017-11-01 16:31:14
index.js:4 Uncaught TypeError: React.createClass is not a function? ? at Object.<anonymous> (index.js:4)? ? at __webpack_require__ (bootstrap 76b8bc0f513264952518:19)? ? at Object.<anonymous> (bundle.js:1183)? ? at __webpack_require__ (bootstrap 76b8bc0f513264952518:19)? ? at module.exports (bootstrap 76b8bc0f513264952518:62)? ? at bootstrap 76b8bc0f513264952518:62var React = require('react');var ReactDOM = require('react-dom');var CommentBox = React.createClass({? render: function() {? ? return (? ? ? <div>? ? ? ? Hello, world! I am a CommentBox.? ? ? </div>? ? );? }});ReactDOM.render(? <CommentBox />,? document.getElementById('example'));
查看完整描述

2 回答

?
牛奶老哥哥

TA貢獻(xiàn)204條經(jīng)驗(yàn) 獲得超92個(gè)贊

教程會(huì)給你整個(gè)代碼,拿到它的 package.json 文件,這里面有教程里使用的react版本,替換自己的,然后 npm 安裝就好了.再看看新的react組件創(chuàng)建方式.

查看完整回答
反對(duì) 回復(fù) 2017-11-01
?
Caballarii

TA貢獻(xiàn)1123條經(jīng)驗(yàn) 獲得超629個(gè)贊

這個(gè)方法在react16里面被移除了,麻煩去找個(gè)新一點(diǎn)的教程,現(xiàn)在都是extends Component的形式,createClass太老太老了

查看完整回答
反對(duì) 回復(fù) 2017-11-01
  • 2 回答
  • 0 關(guān)注
  • 4378 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)