Build a cross-platform mobile app using React Native
Tags: javascript, mobile, reactnative, mobileappdevelopment
Published: 2019-03-11 20:21:33

---
title: Build a cross-platform mobile app using React Native
published: true
tags: javascript,mobile,react-native,mobile-app-development
canonical_url: https://tmarkiewicz.com/build-a-cross-platform-mobile-app-using-react-native/
---

As part of my developer advocacy efforts at IBM, I often build and share demos to showcase our products and how developers can integrate them into their own applications.

The [IBM Developer](https://developer.ibm.com/) site provides a wealth of resources for developers with a focus on code, content, and community. And code patterns are our way of providing full solutions to common problems that developers regularly face in their work. These [code patterns](https://developer.ibm.com/patterns/) “leverage multiple technologies to solve issues that our developer advocates have recognized as common use cases across multiple industries.”

I recently finished a new code pattern that shows how to [create a cross-platform mobile application using React Native](https://ibm.biz/BdzRGW) framework.

![](https://cdn-images-1.medium.com/max/974/0*LlyOdKvLfQzefBqV.png)

The pattern I built uses [Watson Discovery News](https://www.ibm.com/watson/services/discovery-news/) and [React Native](https://facebook.github.io/react-native/) to build a cross-platform mobile app that fetches recent news for a specific company. React Native is a JavaScript framework that lets you write mobile apps for iOS and Android. The application uses Watson Discovery News to fetch recent and relevant news articles along with sentiment, keywords, and related concepts. Easily customizable, this demo app provides a convenient starting point to use Watson Discovery in your own React Native applications. Instead of learning Swift, Java, or Kotlin to build native mobile applications, you can quickly create apps using your JavaScript knowledge.

React Native uses the same design as [React](https://reactjs.org/), letting you compose a rich mobile UI from declarative components. For an excellent overview on React Native and building mobile apps using only JavaScript, take a look at the article [Dissecting React Native](https://ibm.biz/BdzRnc). If you’re interested in diving deeper into React Native, I highly recommend the Udemy course [The Complete React Native and Redux Course](https://www.udemy.com/the-complete-react-native-and-redux-course/) by Stephen Grider.

![](https://cdn-images-1.medium.com/max/1024/0*hBTM4lTtdm8FXRWD.png)

If you’re unfamiliar with the service, [IBM Watson Discovery](https://www.ibm.com/watson/developercloud/discovery.html) is a cognitive search and content analytics engine for applications to identify patterns, trends, and actionable insights. Using Discovery, developers can extract meta-data from returned content such as concepts, keywords, and sentiment using natural language understanding. [Watson Discovery News](https://console.bluemix.net/docs/services/discovery/watson-discovery-news.html#watson-discovery-news) is an indexed dataset that is pre-enriched with natural language processing (NLP) features such as keywords, entities, semantic roles, sentiment, relations, and category classification. So instead of using two products (Watson Discovery and [Natural Language Understanding](https://www.ibm.com/watson/services/natural-language-understanding/)), a developer can make a single API to get combined results.

It’s easy to get started and try the application, even if you have no JavaScript expertise. Just clone the repo, sign up for a free IBM Cloud account, and then update the Discovery credentials with your own. You can have your own cross-platform mobile news app running in minutes.

You can find the full repo on Github [here](https://github.com/IBM/build-react-native-app-for-watson-discovery). If you use this as a starting point for your application, please let me know!

_Originally published at_ [_tmarkiewicz.com_](https://tmarkiewicz.com/build-a-cross-platform-mobile-app-using-react-native/) _on March 5, 2019._