React Js Error "...rest" Syntax Error: Unexpected Token
I am new to React and looking at this ReactTraining. I would like to make some of my paths private (that way you can only view them when you are logged in). I am able to authenti
Solution 1:
The spread ...
syntax is not part of the es2015
or react
babel presets. It's currently a stage 3 proposal. To enable support for spread in your React project, install the babel stage 3 plugin:
npm install --save-dev babel-preset-stage-3
and add it to your .babelrc
:
{
"presets": [
"es2015",
"react",
"stage-3"
]
}
Post a Comment for "React Js Error "...rest" Syntax Error: Unexpected Token"