dimanche 30 novembre 2014

Is var { Route, Redirect, RouteHandler, Link } = Router; valid in Javascript?


What does this mean in Javascript ? I found this in react-router examples



var { Route, Redirect, RouteHandler, Link } = Router;


I get the following error when it is run through browserify.



"Uncaught SyntaxError: Unexpected token {"


https://github.com/rackt/react-router/blob/master/examples/dynamic-segments/app.js


Esprima also gives the same error: http://esprima.org/demo/validate.html





Aucun commentaire:

Enregistrer un commentaire