Developing cross-platform mobile application with React Native

Before we did some project on Cordova – it was a good experience, but we wanted to try new React Native framework. Fortunately one of our scandinavian customers asked us to make a mobile application for his IoT infrastructure. The application should notify user about events from IoT cloud which collects data from different sensors (fire alarm, leakage detector, security systems, etc).








However the main feature of GodaGrannen service is connecting neighbours. Each neighbour is a “sensor” which can send and receive notifications. For this purpose a list of contacts and groups was made inside the application.








The application allows to send SMS to users (and groups of users). Also it allows to make chats between several users.








Now it’s time to talk a bit about background. For state management we used Redux container, which is “must use” tool when you are working with React. For navigation we used React Navigation library, which is recommended by official React Native guide. For server side communication we used GraphQL and  Apollo. This allows to reduce from the boilerplate code, because Apollo hides the routine and gives better interface for iteraction with server — for each component you can write your own query for fetching the data. For push notifications we used service provided by OneSignal, which gives better interface for working with messages on Android and iOS.