0
내 html 파일을 열면 아래와 같은 오류 메시지가 나타납니다.잡종 오류 JS에서
TypeError: undefined is not a function (near
'..._react2.default.createClass...')
(anonymous function)bundle.js 966
_webpack_require bundle.js 20
(anonymous function)bundle.js 73
_webpack_require bundle.js 20
(anonymous function)bundle.js 63
_webpack_require bundle.js 64
이이 내 app.js이 내 첫 component.js 나를 제발 도와주세요
import React from 'react'
import ReactDOM from 'react-dom'
var CommentBox=React.createClass({
render:function(){
return(
<div className="CommentBox">
HelloWorldCommentBox
</div>
);
}
});
ReactDOM.render(
<commentBox/>,
document.getElementById('content')
);
파일입니다 import firstComponent from './firstComponent'
파일 내 HTML 코드
</head>
<body>
<div id="content"></div>
<script src="js/bundle.js"></script>
</body>
</html>
입니다 이와 함께
'commentBox'는'CommentBox' – Rajesh
@Rajesh 왜해야 하는가? 나는 에러가'createClass'가 16에서 제거되었다고 생각한다. – Li357
@ Li357 나는 그것에 대해 모른다. – Rajesh