I am new to React and trying to speed up with response-router (v1.0.0).
I installed a simple component and a simple route, but it gave me an error: Invariant Violation: Invalid tag: {HelloWorld} . You think this is a clear mistake, but I canβt understand what is wrong with the code.
Here he is:
var HelloWorld = React.createClass({ render: function() { return ( <p>Hello world</p> ); } }); var routes = ( <Router> <Route path="/" component="{HelloWorld}"/> </Router> ); ReactDom.render(routes, document.querySelector('#main'));
If I disable routes with <HelloWorld /> in the ReactDom.render , it works fine.
Any help is much appreciated!
javascript reactjs react-router
Meldon
source share