1: Prepare to install the es7 plug-in in VSCode and restart the compiler to take effect
2: Create a new js file named header.js in src and use the shortcut rcc ps: rcc is a class component and rfc is a function component
3: Use the header component in index.js
4: The transformation function APP component becomes a class component
5: After completion, remember to save and run the start command npm run start. Pay attention to whether the command is in the project directory and you can see the effect as follows