[React] Support for the experimental syntax 'decorators-legacy' isn't currently enabled Error
1. install react-app-rewired from babel
npm install customize-cra react-app-rewired @babel/plugin-proposal-decorators --save
2. Set babel decorator properly in folder
npm install --save-dev @babel/plugin-proposal-decorators
3. Intall mobx and mobx-react to use mobx
npm install mobx --save
npm install mobx-react --save
4. Change package.json scripts's start to "react-app-rewired start" (others are option for pure running)
"scripts": {
"start": "react-app-rewired start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
}
5. Create config-overrides.js file to root folder
const { override, addDecoratorsLegacy } = require('customize-cra');
module.exports = override(
addDecoratorsLegacy()
);
It's been a while to write some post 👐
I promise i will visit more often than this
*관리자님들 코드 작성할때 에러납니다 고쳐주세용
[Javascript/React] JSON으로 만든 XML을 그려보자(드디어) feat. D3 (0) | 2022.06.30 |
---|---|
[Javascript] 내용에 따라 높이가 조절되는 textarea (2) | 2022.04.22 |
[Javascript] 0.4 + 0.3 은 0.7이 아닐 수도 있다 / 자바스트립트의 이상한 소수 계산법 (0) | 2022.04.05 |
[React/Front] React에서 slider를 적용해보자 (0) | 2022.03.14 |
[React/Error] trying to update itself. Did you intent to update an _observable_value, instead of computed property? (0) | 2021.10.02 |