简体   繁体   English

当我在 app.js 中将标签 'learn react' 编辑为 'learn react pranjal' 然后保存并重新加载它时,在浏览器中没有观察到任何变化,为什么? 请帮助我

[英]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并保存以重新加载。

Learn react pranjal ); 学习反应 pranjal ); } }

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.

相关问题 尝试构建 React-Admin,不断收到“编辑 src/App.js 并保存以重新加载” - Trying to build React-Admin, keeps getting "Edit src/App.js and save to reload" Coursera-学习Angular-为什么我的app.js无法加载? - Coursera - Learn Angular - Why can't I get my app.js load? React js:./src/App.js第22行:未定义'lastWinner'no-undef搜索关键字以了解有关每个错误的更多信息 - React js: ./src/App.js Line 22: 'lastWinner' is not defined no-undef Search for the keywords to learn more about each error 当我更改我的 app.js 时,React 页面不会刷新 - React page do not refresh as i change my app.js React 应用程序的 Webpack 再生器编译问题,请帮助我 - Webpack regenerator compile issue for React app, help me pls 什么是react js的学习方式? - What is a react js the way to learn? 在 React.js 中,如何根据 app.js 中的 url 更改页面的 header - In React.js, how can I change header of the page according to url in app.js 每当我在反应中保存 app.js 文件时,总是会出现错误和意外的令牌 - Whenever I save app.js files in react it errors always comes up and unexpected token 为什么在 App.js 中未定义 React Native App.js 导航? - Why is React Native App.js navigation undefined in App.js? React Bootstrap 组件在我的 App.js 中加载时没有出现 - React Bootstrap component doesn't appear when I load it in my App.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM