I haven't seen this syntax before and would like to know what it means.
var { Navigation } = require('react-router');The curly brace on the left of
will cause a syntax error:
unexpected token {
I'm not sure which part of the webpack configuration does the conversion, or what the purpose of this syntax is. Is this a Harmony thing? Can someone explain this to me?
This isdestructuring assignment. It is a new feature of ECMAScript 2015.
Equivalent to:
It is calledDestructuring assignmentand is part of theES2015 standard.
Object destructuring
Array destructuring