O'Reilly logo

React Native - Building Mobile Apps with JavaScript by Vladimir Novick

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Twitter API to work with real data

Now, it's about time we connect our app to the actual Twitter API, but before we do that, we need to eject from CRNA. Connection to Twitter API will be done by the npm package with native modules dependencies, and we will need to link them properly:

npm run eject

Now, the app will fail if you run it, because as I mentioned earlier, react-native-elements has a dependency on react-native-vector-icons. When we worked inside an environment with expokit installed, all was good, but as soon as we ran eject into react native app, we need to install and link this dependency.

So, let's run this command:

npm i -S react-native-vector-icons

And then link vector icons properly by running:

react-native link ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required