[英]when i edit the tag 'learn react' to 'learn react pranjal' in app.js and then save and reload it no change is observed in browser , why? pls help me
when i edit the tag 'learn react' to 'learn react pranjal' in app.js and then save and
reload it no change is observed in browser , why? pls help me
function App() { return ( function 应用程序(){返回(
Edit src/App.js
and save to reload.编辑
src/App.js
并保存以重新加载。
What do you write in your terminal to run it?你在终端里写什么来运行它?
Depending on what you write to run the react app the update-on-save function might not be working.根据您为运行反应应用程序而编写的内容,保存时更新 function 可能无法正常工作。
If you are using npm in WSL2.0 for development, please refer the last point in this- https://create-react-app.dev/docs/troubleshooting/#npm-start-doesnt-detect-changes如果您在WSL2.0中使用npm进行开发,请参考本文最后一点-https://create-react-app.dev/docs/troubleshooting/#npm-start-doesnt-detect-changes
While WSL1.0 doesn't use a VM, WSL2.0 does use a lightweight VM, so adding虽然 WSL1.0 不使用 VM,但 WSL2.0 确实使用了轻量级 VM,因此添加
CHOKIDAR_USEPOLLING=true
in a.env file in the project directory fixed the problem.在项目目录中的 a.env 文件中修复了该问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.