[英]React htmlFor: I corrected the erros in code, but the warnings still appears
I was getting the warning: Warning: Invalid DOM property 'for'. Did you mean 'htmlFor'?
我收到警告:
Warning: Invalid DOM property 'for'. Did you mean 'htmlFor'?
Warning: Invalid DOM property 'for'. Did you mean 'htmlFor'?
I already changed to 'htmlFor'
every where I used 'for'
.我已经将每个使用
'for'
地方都更改为'htmlFor'
' 。 But the warnings didn't go away.但是警告并没有消失 go 。
I used VS Code to search through all files for ' for=
' and all results where ' htmlFor=
'.我使用 VS Code 在所有文件中搜索“
for=
”以及“ htmlFor=
”的所有结果。 So I believe everything is correct but the warning still appears.所以我相信一切都是正确的,但警告仍然出现。
Maybe you haven't rebuilt the code?也许你还没有重建代码? Did you run eg
npm run build
after the change?您是否在更改后运行了
npm run build
?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.