As I wrap up my current project, a React Native app, my team has been thinking a lot about what went right and what went wrong when using the framework. Since it’s a pretty lightweight framework, we brought in a lot of external libraries to help us build our app. Besides some always-useful libraries, such as Lodash, Redux, and date-fns, there were a few that really helped the app come together.
React Navigation is perfect when your app needs to navigate between a few different screens. It offers support for stacks of pages, drawer navigation, and tab navigation. It allows you to wire up your pages however you like, and you can even create your own custom navigators if the out-of-the-box solutions aren’t enough for you. On our project, this library helped make app navigation a minor chore, instead of a major undertaking.
I wrote about getting started with React Navigation a few months ago.
React Native Push Notification
Our app needed local notifications–essentially daily reminders set up by the users. For this purpose, React Native Push Notification was a great, easy-to-use library. Setting up a notification was as simple as configuring the title, message, image, sound, and plenty of other options. Then, the notification can be scheduled, either for a one-time use or to trigger on a regular basis. I especially like this library because it’s easy to pick up and use, and scheduling a notification can be done in just a few lines.
React Native SVG
Part of our UI includes some dynamically sized lines and shapes, but React Native doesn’t have support for drawing those types of components out-of-the-box. (It is worth noting, however, that this library is pre-installed when using Expo.) This is where React Native SVG comes in handy. Any time we needed some sort of generated shape, we used this library to draw it. Plenty of our icons and UI feature shapes were drawn using this library.
I found these three libraries to be indispensable on my project, and they all provide great functionality that almost every app could use. For all of my future React Native projects, they’ll be my go-to resources when I need the kind of capabilities that they provide.