How to enable optional chaining with Create React App and TypeScript

后端 未结 3 1792
心在旅途
心在旅途 2021-02-18 17:59

Support for the experimental syntax \'optionalChaining\' isn\'t currently enabled

I was getting the above error. I followed this post and

3条回答
  •  被撕碎了的回忆
    2021-02-18 18:41

    React scripts 3.3.0 and above supports it. There is no need to install the react-scripts@next.

    Just put in the package.json "react-scripts": "^3.3.0" and it will work.

提交回复
热议问题