r/reactnative • • Jul 14 '21

Kudos

Post image
459 Upvotes

27 comments sorted by

56

u/akie Jul 14 '21

The Facebook app has more than a thousand screens?!?

29

u/HermanCainsGhost Jul 14 '21

That’s not that crazy? It’s probably one of the most complex apps on Earth. Facebook is a big business.

I have a tiny app and it has 50 screens, I imagine an enterprise app with a ton of different functions has many, many more

7

u/TreeKaaPoo Jul 15 '21

Thousand screens maybe because of A/B testing. So 1 feature can have multiple variants. Maybe you and me are using different FB app

5

u/EngVagabond React Native Team Jul 17 '21

Yep! There are tons of products written with React Native in the FB app, like Marketplace and Dating. Then take Marketplace, you have the home feed screen, the details screen, the search screen, search results screen, rentals screen, rentals map screen, multiple screens for listing items of different types, etc. It’s a bunch of major products, all rolled into one app! It’s been pretty intense getting them all to metrics (performance and engagement) parity with the new architecture

23

u/KremBanan Jul 14 '21

1000 sign up screens in different language

11

u/Crafty-Survey-5895 Jul 14 '21

Are they all wholly unique? I would assume localisation would just use a different language catalogue to display the information, maybe a variation or two for languages that read left to right and one for those that read right to left with the elements mirrored etc

1

u/Disastrous_tea_555 Jul 14 '21

That’s such bad practice. I doubt they would allow 2 screens in different languages.

32

u/ertemaktay Jul 14 '21

I didn't go Flutter for this reason. I kept faith with RN since than. We see alots of RN transition from huge companies(Shopify,Coinbase). These teams choose RN because they know the power of the new architecture. We would likely see benchmarks,comparisons and almost all of the articles Flutter vs React Native could be irrelevant soon. Because current RN architecture lag behinds Flutter in terms of Cpu and ram usage. And JSI/Turbomodules solve this issue.

22

u/HermanCainsGhost Jul 14 '21

Yeah, a buddy of mine asked if he should use Flutter recently and I told him the ecosystem was smaller and RN had the backing of Facebook and Microsoft.

I’ll stick with RN.

20

u/andordavoti Jul 14 '21

Can anyone explain what the fabric renderer is?

73

u/[deleted] Jul 14 '21

Renderer is the part of React Native that is responsible, roughly, for displaying the components you write on the screen. Fabric is a new version of renderer, written from scratch, that aims to fix issues with current renderer, and also make rendering faster. It is written in C++ and is shared between iOS and Android. It is also based on JSI / Turbomodules, which means that the infamous Bridge between JS and Native is no longer needed, increasing app responsiveness and performance across the entire RN stack.

It also should support a new React feature called Concurrent Mode.

7

u/Mamba24ever Jul 14 '21

When does this come out to open source ?

7

u/eggtart_prince iOS & Android Jul 14 '21

On "stay tuned".

2

u/gwmccull Jul 15 '21

From what I’ve heard, Facebook uses the latest build of master in their apps so I think all of the Fabric code is already public (yes this is my own tweet but the quoted tweet gives some more info as does the fact that a RN core engineer liked it)

https://twitter.com/gwmccull/status/1415196317781925889?s=21

12

u/Crafty-Survey-5895 Jul 14 '21

This all sounds so exciting

3

u/andordavoti Jul 14 '21

Thanks man, really appreciate it!

1

u/[deleted] Jul 14 '21

What do you mean by „bridge between JS and Native“? I’m relatively new to RN

12

u/european_origin Jul 14 '21

I'm not 100% sure, but this GitHub issue should help you get an understanding by yourself: https://github.com/react-native-community/discussions-and-proposals/issues/4

Taken from the post:

In the current architecture, all UI operations (like creating native views, managing children, etc). are handled by a native module called UIManagerModule. The React Reconciller sends UI commands over the bridge, which are eventually handled by this module and delegated to UIImplementation. This in turn creates shadow nodes that represent the layout tree and are passed to Yoga to determine the relative co-ordinates based on the Flex box styles that are passed in from JS. In the new system, the UI operations are directly exposed to JavaScript as functions using the JSI interface described above. The new UI manager can then create ComponentDescriptors and the Shadow Nodes for specific view types (like Text, View or Images), and then communicate with Java/ObjC to draw platform specific UI.

3

u/Damsterham Jul 14 '21

This is a good article about it (in 4 parts): https://formidable.com/blog/2019/react-codegen-part-1/

2

u/[deleted] Jul 14 '21

Same here

5

u/littleon3 Jul 14 '21

It's about time, been waiting for too long.

17

u/fiveMop Jul 14 '21

I guess it's been around two years that they are going to bring it to open source in the next quarter or so. meanwhile lots of people got disappointed of RN, some of them switched to Flutter, some of them to native development.

-4

u/[deleted] Jul 14 '21

Lots of bad dancers who quarrel with their legs sure did move to Flutter. I’d say good riddance for the community.

Our team has gotten really tangible benefits from using React Native that would have been impossible with other technology stack. I personally know several other teams that never had any serious issues with RN.

1

u/handofblood9 Jul 14 '21

How do they organize all +1k screens in the project?