yarn add -D @babel/preset-{env,react,proposal-class-properties}
.babelrc
{
"plugins": [
[
"@babel/plugin-proposal-class-properties", {"loose": true}
]
],
"presets": [
[
"@babel/preset-env", {
"modules": "commonjs",
"targets": {
"node": "current"
}
},
],
"@babel/preset-react"
],
}
If I got that correct this time around, that first plugin (class-properties) is the solution, or one. It may be mentioned already in one of your links. I don’t have a big issue with: class-autobind
in the constructor really either.