简体   繁体   English

了解 Flutter 和 React Native

[英]Understanding Flutter and React Native

I am evaluating React Native and Flutter.我正在评估 React Native 和 Flutter。 I am not experienced in both of these frameworks and hence need some information which I did not find easily with google search.我在这两个框架中都没有经验,因此需要一些我在谷歌搜索中不容易找到的信息。 I have very specific questions:我有非常具体的问题:

  1. Can we build just iOS and Android app with React?我们可以用 React 只构建 iOS 和 Android 应用程序吗? And not web app, PWA and desktop apps?而不是 web 应用程序、PWA 和桌面应用程序?

  2. Can we build all iOS, Android, Web app, PWA and desktop apps with flutter?我们能否使用 Z5ACEBC4CB70DDBBAE6Z074B0AC76AAB17 构建所有 iOS、Android、Web 应用程序、PWA 和桌面应用程序? At least that's what flutter homepage seems to say.至少flutter 主页似乎是这么说的。

  3. If answer to Q1, is NO, then does web app developed in React share code with React Native app?如果 Q1 的答案是否定的,那么用 React 开发的 web 应用程序是否与 React Native 应用程序共享代码? If yes, then how much?如果是,那么多少钱? I believe no, but need confirmation.我相信没有,但需要确认。

  4. Flutter is "compiled" to native code of target platform. Flutter 被“编译”为目标平台的本机代码 On the other hand React Native app works by making JS code running in JS VM to communicate with Native counterpart through a message passing RN bridge .另一方面,React Native 应用程序的工作原理是使 JS 代码在 JS VM 中运行,以通过消息传递 RN bridge 与 Native 对应方通信 So RN app is not "compiled" to native code.所以 RN 应用程序没有“编译”为本机代码。 Am I correct with this understanding?我的理解正确吗?

  5. Also I believe being not compiled to native code, RN apps might be slower than flutter apps at least in some instances?另外我相信没有编译为本机代码,至少在某些情况下,RN 应用程序可能比 flutter 应用程序慢?

1: 1:

The app will run both on the web and mobile using the React Native Web library, which lets you use React Native components and APIs in web applications.该应用程序将使用 React Native Web 库在 web 和移动设备上运行,它允许您在 web 应用程序中使用 React Native 组件和 API。 Source 资源


2: Yes Flutter is able to run nativ on Android, IOS, Web and Desktop. 2:是的,Flutter 能够在 Android、IOS、ZC6E190B2846433C48EZ89DZE 和 Desktop 上运行 nativ。 Source 资源


4, 5: Yeah you are right there, Flutter is compiled nativly which grants it a performance boost in most cases. 4、5:是的,你就在那儿,Flutter 是自然编译的,这在大多数情况下都可以提高性能。 Here a suiting arcicle: 是一个合适的aricle:

For usual business apps with minor animations and shiny looks, technology does not matter at all.对于带有小动画和 shiny 外观的普通商业应用程序,技术根本不重要。 But if you'll do some heavy animations keep in mind that Native has the most performance power to do it.但是,如果您要制作一些繁重的动画,请记住 Native 具有最强大的性能。 Next, come Flutter and React Native.接下来是 Flutter 和 React Native。 We would definitely not recommend using React Native in a very CPU heavy operation, while Flutter is a great fit for such tasks from both CPU and Memory standpoint.我们绝对不建议在 CPU 非常繁重的操作中使用 React Native,而从 CPU 和 Memory 的角度来看,Flutter 非常适合此类任务。


Additionally here is a good article that compares both frameworks.此外,这里有一篇比较两个框架的好文章。 It should also be noted that Flutter 2.0 has been out for a few days now and offers many new functions.还应该注意的是,Flutter 2.0 已经发布了几天,并提供了许多新功能。 Among other things, sound null-safety on the same level with Swift.除其他外,与 Swift 处于同一水平的可靠零安全性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Flutter 或 React Native 上具有完整功能的 Native Camera? - Native Camera with full functionalities on Flutter or React Native? Flutter 设备预览等效于 React Native App? - Flutter Device Preview equivalent in React Native App? 理解 Android-Java 中的 res 文件夹(react-native 前瞻) - Understanding res folder in Android-Java (react-native prospective) 部署和获利-了解React Native入门中的步骤10 - Deploy and Profit - Understanding Step 10 in React Native Getting Started 在 Android 和 Apple Store 上为 React Native 部署更改应用程序 Flutter 后? - After deploy change app Flutter for React Native on Android and Apple Store? 通过 Flutter 了解多供应商 - Understanding Multiprovider with Flutter Android - 检测是否从 react native/xamarin/flutter 等调用 - Android - detect if it is called from react native/xamarin/flutter etc 为 Flutter/React-Native/Android-Native 应用生成 SHA-1 - Generate SHA-1 for Flutter/React-Native/Android-Native app Android的Instant Run与Flutter的Hot Reload和React Native的Hot Reload之间的区别? - Difference between Android's Instant Run vs Flutter's Hot Reload and React Native's Hot Reload? Flutter 3 升级后我的嵌入式Native Android 浏览速度慢,对点击事件没有反应并崩溃 - After the Flutter 3 upgrade my embedded Native Android View is slow, does not react to click events and crashes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM