When i create component in react without using es6 in atmosphere package like below:-
var createReactClass = require('create-react-class');
AddTag = createReactClass({
render:function(){
return(
<div>Hello</div>
)
}
});
export default AddTag;
and in package.js
api.addFiles('components/tags/addTag.jsx',['client'])
api.export(["AddTag"]);
this code working fine.
but when i use react with es6 like below:-
import React, { Component } from 'react';
class AddTag extends React.Component{
render{
return(
<div>Hello</div>
)
}
}
export default AddTag;
and package.js is same as above.
but i am getting below error with es6:-
Invariant Violation: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Please advice what i do to resolve this error.
Thanks, Regards, Saransh
It looks like you have a syntax error. Change the render method to this...
Notice the parentheses on the render method definition.