transforms the components into native widgets. Today I’d like to show you a quick overview of what you will see in the React Native world and what you should expect from the framework.
React Native is React
It is worth studying the basics of React before starting with React Native. While you don’t need to know the details of how the internals function, a general knowledge of what should go where will help you navigate your project much quicker. Deep knowledge of React will come with time and isn’t needed to get started with React Native.
React is widely used for web projects around the world. People start using it for many reasons, including:
- Increased componentization
- A full ecosystem with existing open source projects to pull from
As you build a skillset working with React Native, much of that knowledge can be leveraged for web development via React.
Learn Once, Write Anywhere
There is a common saying in the React Native world: “learn once, write anywhere.” This means once you have learned to write a component, you can write it for use on any platform. Often you’ll be able to write that component just a single time and it will compile to native components for iOS and Android.
Platform specific components are important for a more native look and feel.
With React Native, you can easily split components out for each platform and have components like
Button.android.js. This means the
Button component may have different looks and functionality depending on the platform.
React Native makes it easy to customize behavior and design to fit your targeted platforms. Don’t be hesitant to give your users the best possible experience on all your supported platforms.
Writing Native Components
I think one of the most expected features in React Native is generating native components. You can do anything with React Native that you can do natively because React Native has a bridge between the React Native code and the iOS/Android native compiler. That bridge lets us use some native libraries with a bit of code to provide an interface to React. While you don't have to write native code, React Native makes it easy to integrate custom Java, Swift, or Objective-C into your application.
No Hybrid Framework is perfect
There is no perfect hybrid framework. The Ionic and cordova-based frameworks are webview based and this compromises performance and usability.
React Native is very good at what it was made for: Learn once, write anywhere and deploy it on iOS and Android – but it isn’t perfect either, especially related to Performance. React Native tries to achieve 60 FPS and a native look and feel for the apps, but sometimes that's not the case. In the official documentation, there is a section just talking about performance.
React Native’s performance is very decent compared to hybrid frameworks, but it also has some performance problems.
Leveraging Your Web Skillset
If you come from the web development world, you probably know how to debug an app using ChromeDevTools or similar. You also know how to use CSS.
React Native has adopted common development tools and styling methodologies from the Web world. You can debug your app using ChromeDevTools, and if you're using Redux you can also use ReduxDevTools.
React Native uses Flexbox for its CSS based layout. If you’ve used flexbox on the web, this won't be difficult. React Native’s flexbox specification isn’t the exact same as the web, but it’s close enough to easily get started.
Share in the Great Community
When I start looking at a new technology, one thing I check first is their community. How big is it? Do people in the community help each other? Are there libraries? Is good documentation and training content available? Good content?
There are plenty of resources available for anyone who is starting to work with React Native. You can expect a dedicated community that welcomes newcomers.
If you're looking to develop mobile apps for iOS and Android, React Native is worth a try. It has a big community with a lot of libraries. You can use native libraries and wrap it into your application. There is a great community for when you need help. You’ll save time building iOS and Android apps using just one technology. Our first React Native Remote Meetup is happening on soon, and it’s a great way to meet other React Native developers and stay up to date on what is happening in the community.
The best way to start learning any technology is to dedicate a little time to it every day. Get a week of free React Native training with DailyDrip!