简体   繁体   English

React htmlFor: 我更正了代码中的错误,但警告仍然出现

[英]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.

相关问题 在 React 中用 htmlFor 连接两个元素 - Connect two elements with htmlFor in React 我在使用 laravel 时遇到错误并做出反应“无效的 DOM 属性 `for`。你的意思是 `htmlFor`” - I'm getting error using laravel and react "Invalid DOM property `for`. Did you mean `htmlFor`" React htmlFor - 点击 label 关注输入错误 - React htmlFor - clicking label focus on the wrong input 在React中使用htmlFor传递eslint html-has-for - Pass eslint html-has-for with htmlFor in React 我正在尝试创建一个反应网站并在其中添加挂钩,但面临这个错误 - I am trying to create a react website and add hooks in it but face this erros 下拉菜单垂直而不是水平显示(使用 React)。 我将 OL 设置为 display: block 但它仍然水平显示下拉菜单 - Dropdown menu appears vertically instead of horizontally (using React). I set the OL to display: block but it still displays the dropdown horizontally html对于不起作用 - htmlFor not working 代码中需要更正哪些内容才能使其在智能手机上运行? - What needs to be corrected in the code to make it work on smartphones? 我已经在 AWS amplify 上部署了新的 React 代码,但网站上仍然看不到更改?? 如何解决这个问题? - I have deployed the new React code on AWS amplify but the changes are still not visible on the website?? How to solve this issue? 我可以成功地从 API 中获取数据。 我可以读取一些属性,但尝试读取错误中的大部分结果 - I can fetch the data from an API in react succesfuly. I can read some of the properties but trying to read most of the results in erros
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM