反应原生与 CRNA [英] React Native vs CRNA

查看:27
本文介绍了反应原生与 CRNA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 React Native 应用程序开发开始,需要帮助来决定我应该走哪条路.

I want to start with React Native app development and need help to decide on which path I should go.

主要问题是:我应该使用 React Native 还是创建 React Native 应用程序?

The main question is: should I go with React Native or create react native app?

据我所知,CRNA 确实是使用 expo 客户端和工具进行本地反应,使用更舒适(不需要开发帐户等)

From what I understand, CRNA really is react native using the expo client and tools, with a more comfortable use (no dev account required, etc)

我可以看到使用 CRNA 比使用 react native 的优势(无需设置依赖项、更快的开发时间、无需 iPhone 开发帐户或 xcode+android 组合等)

I can see the advantages with using CRNA over react native (no being no need to set up dependencies, faster time to start with developing, no need for iPhone dev account or xcode+android combi, etc.)

然而,由于并非所有本机库都包含在内,我认为自己需要在以后导出我的应用程序,并像以前一样继续使用 xcode 和 Android Studio.

However, as not all native libraries are included, I see myself in the need to export my app at a later point anyway and continue to work with xcode and Android Studio just like before.

因此,如果 CRNA 只是开始一切的好方法,那么我会立即选择 vanilla react native,因为我认为临时解决方案毫无意义.

So, if CRNA is just a nice way to get started with everything, then I would go for vanilla react native right away as I see no point in a temporary solution at all.

另外,也许你可以纠正我这一点,我不喜欢在我的应用程序顶部只使用另一个包装器的想法,除非我错过了一些更重要的优势.

Also, and maybe you can correct me on this, I do not like the idea to have just another wrapper on top of my app, unless there are some more crucial advantages which I missed out.

那你能分享一下你的经验吗?如果你过去用 react native 开发过应用,你走哪条路,未来又会走哪条路?React Native、CRNA 还是 React Native 和 expo 环境?

So could you please share your experience on this? If you have developed apps with react native in the past, which path did you go and which path will you go in the future? React Native, CRNA or React Native and expo environment?

推荐答案

我也会分享我在这个话题上的一些经验.

Hi I will also share some of my experience on the topic.

由于我有前端背景并且不熟悉 XCode 或 Android Studio,因此我决定从 CRNA 开始我的本机应用程序开发.

Since I have a front end background and was not familiar with XCode or Android Studio I've decided to start my native app developement from CRNA.

确实只需要一个文本编辑器,完全使用 javascript 并利用内置的 expo SDK 组件,我就能够快速实施并发布到 Play 商店是一个相当简单的应用程序.我觉得真的很神奇:)

Indeed with just a text editor, purely with javascript and utilizing built-in expo SDK components I was quickly able to implement and publish to Play Store a fairly simple app. That I find truly amazing :)

然而,在发布应用程序后,我意识到存在一些缺陷,无法与同类 Java 应用程序竞争:

However after publishing the app I realized there are some pitfalls that unable it to compete with similar rival Java apps:

最大的IMO是用exp生成的apk的大小服务.对于只有 3 个屏幕并且没有很多业务逻辑的应用程序,安装后 25 mb 和大约 60 mb 真的很多.根据世博会开发者 更复杂的应用由于大部分大小是本机依赖项,​​而不是实际的 javascript 端,因此大小将大致相同或仅稍大一些.但这仍然是一个大问题,我可能不得不eject应用程序来优化构建大小

The biggest IMO is the size of the apk generated with exp service. For the app with just 3 screens and not a lot business logic, 25 mb and about 60mb after install is really a lot. According to expo devs more complex apps will be approximately the same size or only slighty larger due to the bulk of the size being the native dependencies, and not actual javascript side. But this still is a big problem and I will probably have to anyway eject the app to optimze the build size

因此,总的来说,CRNA 是一种很好且快速的启动方式,并且可以快速开始工作,但在将应用发布给用户之前,您还是会避免设置自定义构建和所有依赖项(如 Android Studio)

So in general CRNA is a great and fast way to start and have something working but still before publishing the app to the users you'll not avoid seting up your custom build and all the dependencies like Android Studio

这篇关于反应原生与 CRNA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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