There is a picture. After react is defined with the arrow function in the class, the compilation error is reported. Is it the babel configuration problem?

the following three pictures. When npm run dev, syntax errors are reported. Is it a problem with babel configuration?
is mainly because when you want to define a function, you don"t want to use bind, so change it to the arrow function, but always report an error.


May.04,2022

package.json
"@ babel/plugin-proposal-class-properties": "^ 7.0.0",

webapck

"plugins": ['@babel/plugin-proposal-class-properties']

found a solution. I just went to the console of the browser and saw a paragraph

.
syntax 'classProperties' isn't currently enabled

so do a search and install

npm i -D @babel/plugin-proposal-class-properties

then in webpack, configure

under babel-load
options: {
        plugins: ['@babel/plugin-proposal-class-properties']
         }

Source
https://www.cnblogs.com/52tec...

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-1e9f43c-5c85c.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-1e9f43c-5c85c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?