When creating a react project, using the react-hot-loader component, the component does not take effect

1. When creating a react project, because the state value of the component will be reset to the initial value when using the webpack-hot-middleware hot update page, the component of react-hot-loader will be used to deal with it, but no matter how to set it, it will not take effect. I don"t know why
2.

webpack

Mar.16,2021

it seems that you didn't use a decorator to wrap the components.

import {hot} from 'react-hot-loader';

export default hot(module)(Counter);

or decorator syntax for the stage phase, which requires additional plug-ins for babel

import {hot} from 'react-hot-loader';


@hot(module)
export default Counter extends Component {}
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-1b3645d-2c006.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-1b3645d-2c006.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?