The attributes under window are used in the react component. If window is omitted, an error will be reported.

this is that I introduced jquery, into index.html. If the component uses $directly, it will report an error, but window.$ will be fine.
clipboard.png

Mar.06,2021

. Your question. AHA

1. : `eslint`
2. : `eslint``global``$`
3. : `eslint``env``jquery`
4. :`jquery`

check more. And since you used react , why use jquery .
finally, all the window.$ works, it should be the eslint configuration in your construction tool that writes window is a global object.


the answer upstairs is perfect

Menu