Live data from Hacker News

New Architecture is here

reactnative.dev

21–30 of 127 posts

Re: New Architecture is here

#21

Is Capacitor a viable solution yet? I saw this tweet saying "it just works" for porting a webapp on NextJS: https://x.com/marc_louvion/status/1836023560462360746

Capacitor is really cool because it allows you to build a web app in iOS and Android and access the platform APIs from JavaScript. The rendering layer is a bit different though, because in React Native you can use the platform APIs _and_ the platform components. In React Native, the views you render on iOS are the same UIKit UIViews that a native app would write. In Capacitor, these are DOM elements in a webview. There are different tradeoffs, but this difference is what makes React Native look and feel more native.

Re: New Architecture is here

#22
post #16
post #11

Earlier quoted context omitted.

Premature by 17+ years? He was and remains completely wrong.

No? Most modern apps these days _are_ just web apps. Why does it need the overhead architecture of running full standalone applications when a web clip works just as well? Plus there's no need for updating. The problem at the time was multifaceted. The devices couldn't handle it, the network couldn't handle it, and webkit was still relatively limited. But it did work. https://9to5mac.com/2021/06/03/remembering-apples…

If that's the case, then why does nearly every company have a native app in addition to their website? Surely, they could save a lot of time and money by just not building and maintaining the app.

Re: New Architecture is here

#23
post #5

I've used React Native quite a bit in the past and I gotta say I wish it didn't have to exist at all. It's often times fine on iOS and then incredibly slow on Android. Hermes is very exciting but still requires many polyfills to make simple NPM packages work. I hope one day, the web (and embedding web apps on mobile) makes React Native fully obsolete.

I've had the complete opposite experience. React Native has been amazing for the team I work on. It's fast, quick to develop in, and I've never felt blocked. Camera, TCP sockets, custom Bluetooth protocols, Protobuf, etc. React Native + libraries do it all.

We don't use Expo, either. It's very painless.

Re: New Architecture is here

#24

Is Capacitor a viable solution yet? I saw this tweet saying "it just works" for porting a webapp on NextJS: https://x.com/marc_louvion/status/1836023560462360746

In my opinion no. Capacitor has the same pitfalls like NativeScript. They're both clunky and lacks proper integration between the native layer and the emulated javascript world.

Re: New Architecture is here

#25

I helped write this post, so feel free to ask me anything about the New Architecture!

Thank you! Slightly off topic but every time new Xcode versions happen or as a result of time passing I always seem to get a messed up/corrupted Xcode project and so I end up copying the src folder and create a new project usually with an updated React Native version. This can be a real pain to be honest, taking sometimes a day or two of messing around with package version compatibility hell.

Is there a plan to fix this flakiness that I experience every 3 months or so?

Re: New Architecture is here

#26
I did a performance test last year, rendering thousands of views, and Flutter's rendering speed was 5 times faster than React Native. I wonder if this version will be improved after the update. Interestingly, I used React on the web to render the same number of views, and its speed was much faster than React Native.

Re: New Architecture is here

#27
post #22
post #16

Earlier quoted context omitted.

No? Most modern apps these days _are_ just web apps. Why does it need the overhead architecture of running full standalone applications when a web clip works just as well? Plus there's no need for updating. The problem at the time was multifaceted. The devices couldn't handle it, the network couldn't handle it, and webkit was still relatively limited. But it did work. https://9to5mac.com/2021/06/03/remembering-apples…

If that's the case, then why does nearly every company have a native app in addition to their website? Surely, they could save a lot of time and money by just not building and maintaining the app.

Because it's a pain in the ass to distribute. And there's not much for support integrated into mobile operating systems for seamless browser windows.

MacOS is getting there kind of lately with safari being able to turn web pages into apps. But there isn't really built in mechanisms for that: https://www.macrumors.com/2023/06/14/how-web-apps-work-macos...

Re: New Architecture is here

#28
post #16
post #11

Earlier quoted context omitted.

Premature by 17+ years? He was and remains completely wrong.

No? Most modern apps these days _are_ just web apps. Why does it need the overhead architecture of running full standalone applications when a web clip works just as well? Plus there's no need for updating. The problem at the time was multifaceted. The devices couldn't handle it, the network couldn't handle it, and webkit was still relatively limited. But it did work. https://9to5mac.com/2021/06/03/remembering-apples…

I have never, ever used a web app that runs as well as the native app.

Re: New Architecture is here

#29
Guys, help me understand these changes:

Can I comprehend this as a new Virtual Native UI immutable tree running in native space?

And react native mounts and updates basically synchronally updating this immutable tree and reconciliation being done in native space, dynamically updating the app layout?

Re: New Architecture is here

#30

I helped write this post, so feel free to ask me anything about the New Architecture!

Thank you! Slightly off topic but every time new Xcode versions happen or as a result of time passing I always seem to get a messed up/corrupted Xcode project and so I end up copying the src folder and create a new project usually with an updated React Native version. This can be a real pain to be honest, taking sometimes a day or two of messing around with package version compatibility hell. Is there a plan to fix t…

Yeah this is a tricky problem, and it's one of the reasons we updated our recommendation to use a framework like Expo that can make upgrades be smoother by being more opinionated about the setup.

As the core library, we need to support all the different ways React Native can be added to an app (from fully react native to adding react native to an existing app) and all the different build tools an existing app may use. So it's hard for us to be opinionated about the setup in a way that would make upgrades seamless, but a framework can solve this for you.

Post reply on HN