tepki raylarını kullanıyorum gem ve bu şekilde benzeyen ES6'da birkaç bileşen yazmaya çalışıyorum.Raylar-Tepki ES6 ile çalışmıyor
Benim link_list.js.jsx dosya
import Component from 'react';
import Links from 'link';
class LinkList extends React.component{
constructor(props){
super(props);
this.sate = {};
}
getInitialState(){
return { links: this.props.initialLinks}
}
render(){
var links = this.state.links.map(function(link){
return <Links key={link.id} link={link} />
})
return (
<div className="links">
{links}
</div>
)
}
}
Bu Uncaught ReferenceError: require is not defined
ve Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
ve hatayı Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
şeklinde bir hata almaya devam bu bir sorun var benim kod veya ES6 doğru değil derleme ile bir sorun mu?
Ben daha haha RTFM sanırım: P bu –