React Native中的热重载和实时重载有什么区别? [英] What is the difference between Hot Reloading and Live Reloading in React Native?

查看:262
本文介绍了React Native中的热重载和实时重载有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点困惑.在调试React Native应用程序时,通常会同时启用 Hot Reloading Live Reloading .我想知道它们之间有什么区别?

I'm a bit confused here. When I'm debugging a React Native Application, I usually enable both Hot Reloading and Live Reloading. I want to know what is the difference between them?

推荐答案

实时重新加载,当文件更改时重新加载或刷新整个应用程序.例如,如果您在导航中有四个链接并保存了更改,则实时重新加载将重新启动应用程序,并将应用程序加载回初始路径.

Live reloading reloads or refreshes the entire app when a file changes. For example, if you were four links deep into your navigation and saved a change, live reloading would restart the app and load the app back to the initial route.

热重装仅刷新已更改的文件,而不会丢失应用程序的状态.例如,如果您在导航中有四个链接,并且保存了对某些样式的更改,则状态不会更改,但是新样式将显示在页面上,而不必导航回到您所在的页面,因为您仍然可以在同一页面上.

Hot reloading only refreshes the files that were changed without losing the state of the app. For example, if you were four links deep into your navigation and saved a change to some styling, the state would not change, but the new styles would appear on the page without having to navigate back to the page you are on because you would still be on the same page.

这篇关于React Native中的热重载和实时重载有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆