0
我从eslint得到错误Parsing error: Unexpected token ..
此片段。那有什么问题?Eslint语法分析错误:意外的令牌
const Public = ({ loggingIn, authenticated, component, ...rest }) => (
<Route {...rest} render={(props) => {
if (loggingIn) return <div></div>
return !authenticated
? (React.createElement(component, { ...props, loggingIn, authenticated }))
: (<Redirect to="/" />);
}} />
)
我的猜测是,您没有配置eslint来处理spread/rest属性提议。 http://eslint.org/docs/user-guide/configuring#specifying-parser-options –