Hey React Native 🩵 Developers,
One of the biggest and most exciting conferences, App Js Conf 2024 on React Native, organized by Software Mansion with Expo as the main partner, has recently concluded. The three-day event started on May 22nd, filled with exciting talks. One of the most exciting talks was on ❝ Rules of React Native Frameworks ❞. Today, we will explore more details about it! 🚀
So, Nicola Corti from Meta’s React Native team clarified on stage the key responsibilities of React Native core and React Native frameworks. He also recalled a quote from React Conf 2024.
The core refers to the React Native SDK (latest version 0.74), and React Native frameworks are the toolbox with all the necessary APIs to let you build production-ready apps. (Ex: Expo). Nicola presented a clear and detailed chart of the responsibilities of these two modules.
In the image above, you see two parts: the Frameworks (top section) and the Core (bottom section), each with the features they must provide. He also mentioned that Expo (a React Native framework) provides all the features specified in the above image (top section), which is why the official React Native documentation now recommends using Expo as a React Native framework.
Side by side he mentioned two methods for building a library for React Native.
- Build a library for React native Framework (Ex: For Expo)
- Build a library for React Native Core (Ex: TurboModules)
Although Expo exists, if anyone wishes to create a React Native Framework and have it recommended by the official React Native team, they must follow certain rules as shown below. Nicola primarily emphasized one point: ‘Do not fork the react-native core to create a React Native Framework.’
The React Native core team has recommended these use cases for when you can build your own React Native Framework, only if you’re:
- Pro at native development and needs something unique that other frameworks don’t offer.
- A React Native expert and want to adjust it to suit your company’s way of doing things.
- Aiming to adapt React Native for new platforms, like visionOS.
- A company that has special needs, like legal or licensing issues, that prevent using available frameworks.
I hope you enjoyed reading it. It would be really great if you could consider giving it a STAR ⭐️.
I'm Anis, Sr. React Native Engineer and the author of React Native Advanced Guide Book with 1.7K STAR ⭐️. Over 5 years in React Native and Full Stack, I’ve built numerous production-grade apps. You can 🩵 CONNECT me in X for any consultation.