1. The problem to be solved:
When using Navigate in react-router-dom, you need to import the corresponding package
- Doing repetitive import work is really tiring! ! !
2. Solutions
- Download the corresponding plug-in
Auto Import
- as shown below, or
Ctrl + shift+X
open the application
- as shown below, or
- restart vscode
- Enter the label name, make sure the capitalization is consistent, and it is completely correct
- Move to the corresponding item, press Enter to automatically import the package
- Move to the corresponding item, press Enter to automatically import the package