के साथ काम नहीं कर रहा है मैं प्रतिक्रिया-रेल मणि का उपयोग कर रहा हूं और मैं इस तरह दिखने वाले ES6 में कुछ घटक लिखने की कोशिश कर रहा हूं।रेल-प्रतिक्रिया ES6
मेरे link_list.js.jsx फ़ाइल
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>
)
}
}
मैं इस Uncaught ReferenceError: require is not defined
और एक त्रुटि है कि कहते हैं 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).
और त्रुटि Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
मिलती रहती है इस के साथ एक समस्या है मेरी कोड या क्या यह मणि के साथ एक समस्या है जो ES6 को संकलित नहीं कर रहा है?
मुझे लगता है कि मुझे आरटीएफएम और हाहा चाहिए: पी धन्यवाद, यह सही –