My React Native App Setup
5th Feb 2017
2 Minute Read
2017 will mark a huge milestone for me because I will release my first app for iOS and Android. My strong passion for programming, improving education and helping others led to the release of my website, Revisify, a free to use study tool for students. After 2 years of maturing the website, I plan on delivering the same experience on mobile.
I want to document my process of building the Revisify app so that others who are building their first React Native app too will be able to refer to my process. If you’re interested in why I chose React Native over traditional development, I talk about it here however in this post I will be showing you the libraries that I am using to build the Revisify app.
Data management: Redux, Redux-Saga
The most popular library for implementing the Flux application architecture is currently Redux (If you don’t understand Flux and Redux you can read about it here). I started learning Reflux but moved over to Redux as the official documentation is excellent and the development of other libraries such as Reflux is slowing down.
Redux does not have the functionality to pull data from an API so there are libraries to help you do that. I began using Redux-Thunk since it was easier to understand than the alternative Redux-Saga however I switched over to using Sagas for multiple reasons. It was clear from starting to use Redux-Thunk that it would quickly become a mess to manage and test, especially since my app relies heavily on API calls. Redux-Saga has kept my code organised and easy to understand as well as made it simple to test. Unless your app barely relies on an API I would recommend taking the time to learn Sagas.
I really love Jest due to its simplicity and ease of understanding. Jest works by creating a ‘snapshot’ of your components. If you update the component and generate a new snapshot of it, Jest will compare the old and new versions and ask you if the changes are intended or not. Like React Native, Jest is also built my Facebook, so there is good documentation for implementing it into your app.
Something which I have learnt from building the Revisify website is that it is important to use the right tools and libraries when initially building your application since you’ll have to use it for a long time. If you want to make your development easier use the right tools at the beginning. Your future self will love you for it.