Unexpected token < error in react router component
I'm trying to write router component for my react app. I'm create new react class and define some routes in componentDidMount method. This is full method componentDidMount: function () { var me = this; router.get('/', function(req){ me.setState({ component: <MainPage /> }); }); router.get('/realty', function(req){ me.setState({ component: <RealtyPage /> }); }); router.get('/realty/:id', function(req){ me.setState({ component: <RealtyPage id={req.params.id} /> }); }); }, When I'm go to '/' or '/realty' all works. But, when I'm go to the 'realty/new' I've got error Uncaught SyntaxError: