CodeZeus
1 min readDec 25, 2018

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.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

CodeZeus
CodeZeus

Written by CodeZeus

Software Developer Jesse Boyer, known more by JREAM. Hobbyist and Professional Developer.

No responses yet

Write a response