Babel compilation ES6 property error

class MyClass {
  myProp = 42;
}

the above code will report to Unexpected token when Babel compiles

{
  "presets": [
    "env",
    "react"
  ],
  "plugins": [
    "react-hot-loader/babel"
  ]
}

this is the configuration file of Babel
also ask friends who know

Mar.22,2021

inadvertently found the answer. This is the property initializer syntax. Babel needs to be configured before it can be used. For more information, please see @ babel/plugin-proposal-class-properties

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b00c-2afa0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b00c-2afa0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?