React Conf 2024 Summary PT I: React Native
React Native under the hood

React Conf 2024 Summary PT I: React Native

Keeping up with new technology is something that we as developers always have lingering in the back of our mind. Every day a new framework or library is released whose intention is to solve an IT issue faced by an individual hacker or a team. This is the beauty of the open source community: if you have an IT problem, someone else has probably had it as well, and there's probably a solution out there.

If you've been in the game long enough, you probably know that web development libraries and frameworks come and go. Same with technologies. However, when it comes to web and mobile technologies such as frontend frameworks, Javascript is the clear winner.

Meta has double-downed on its React/Javascript efforts for the developer community and it's working. In this post, I'll summarize where React Native is. Hint: it's no longer just on mobile apps, and it's growing!

For example, let's look at React Native's growth and adoption since its inception in 2015.

React Native weekly downloads via NPM

What's interesting here is that these numbers are coming from the development community. Also, aren't we hearing that B2C mobile apps are on their way out?

The data tells us that users want less apps on their devices. So what do Meta's numbers tell us?


B2C mobile apps have been mostly replaced by progressive web apps and/or web apps. However, the React Native library has gained traction in developing UI's in other native devices. For example, Microsoft's app ecosystem: I learned that even Windows 11 has screens built in React Native (and counting). Microsoft Office apps are also getting refactored in React Native.

If you're in the process of developing a native application (device agnostic at this point), React Native is truly worth exploring.


React Native - what's new?

Meta has built many of their own tools to handle their internal engineering challenges. They built their own version of PHP. They built React.js for web and React Native for devices, to name a few. Since they have a suite of products that have insane amounts of traffic and network requests, they are in the business of pushing the boundaries of technology beyond the usual stuff you hear about (such as VR). For example, over 2 billion server requests/day come from Meta Facebook marketplace alone.

With that being said, Meta and the open source community behind React Native have announced some pretty amazing things that are worth noting.


1) New Architecture: 2024 SDK 51 Version 0.74

React Native's Bridge component (JSON bi-directional messaging flow between native code and Javascript layer) is being replaced by a new JSI (Javascript Interface) layer. Since JSON is serialized, there is a latency issue here (UI blocks, specifically) that have caused enough stink for the Meta engineers to rethink how the architecture should work given modern-day user expectations.

Now, this JSI layer is asynchronous (previous was just synchronous). It doesn't communicate via an intermediary passage such as the Bridge anymore, but rather through memory sharing between the native layer and Javascript layer. It's faster, more efficient (less CPU wasted), and now the two layers run synchronously. Big engineering win for META. This allows React Native apps to run more complex logic without compromising performance or sabotaging the user experience. The example used to show what's possible now with the new architecture was a face detection and face blurring algorithm running at the same time on a user with stunning accuracy. This was impossible to do with React Native's previous architecture.

I'm sure that there will be many more use cases where one can find ways to make more delightful native app features. I can assure you as a developer that I'll be experimenting with AI to make native apps more intelligent and interactive now that there is more CPU available.


2. React Native Standalone or React Framework (Spoiler: Official framework announcement)

Just as React.js recommends now on their website to build web apps using frameworks such as Next.js and Remix, the React Native team has recommended EXPO as the go-to framework to build native apps. Why?

Well, if you build your own app from scratch with no frameworks, you're still going to have to build your own framework. All of your custom components, toasts, fly-outs, cards, styling, etc will take a lot of time and sometimes it's not the best idea to re-invent the wheel, especially as a startup.

As Sir Isaac Newton said, build on the shoulders of giants.

For fast prototyping, I definitely recommend using EXPO. Even for more mature native apps, you can't go wrong with EXPO since most of your folder organization, routing, styling, dependencies and bundling is simplified and any React Native developer can make their way around the codebase, headache-free.

(Full disclosure: I develop virtually all of my client projects with Next.js and have used EXPO extensively for native apps)

Without boring you with the details, EXPO has added new capabilities for developers to resolve some of the challenges faced with building native apps. You can check them out on their official website .


3. React Native Everywhere

As mentioned earlier, React Native is becoming more device agnostic and it's growing in other areas due to its versatility, widespread adoption, fast development capabilities, and strong open source community. The whole point of building React Native was for writing code once and deploying the same app to multiple operating systems.

Amazon is officially backing React Native's use case to build apps for tablets, smart TV's, automotive, and beyond. No surprise, Amazon has been using React Native for years to build UI's for Amazon Shopping, Alexa, Amazon Photos, Kindle, Amazon Music, and Amazon Appstore.


Summary: Why Use React Native?

  • Re-usable code for different digital experiences (React.js web shares very similar design and architectural patterns with React Native);
  • Customizable: use a framework or build it as per your project or customer requirements;
  • You don't need a separate IOS and Android developer to build a UI across different devices;
  • Less resource-intense deployment: a major advantage in cost and speed to ship your digital product;
  • The community behind React Native has made tremendous strides to boost and build on top of the library in terms of performance and usability so that native app development is more manageable;

This is not to say that React Native doesn't have its own unique challenges in terms of development. Native app development is always challenging from cross platform UX differences and failed builds during deployment to name a few. However, the fact that the technology has stood the test of time and continues to be adopted beyond the FAANG companies proves that it's not just hype. Also, if you ever get stuck, you know that there's a large community behind the codebase that is always willing to help.

Stay tuned for Part II: React.js.

#webdevelopment #reactjs #reactnative

要查看或添加评论,请登录

Edward Drew的更多文章

社区洞察

其他会员也浏览了