O'Reilly logo

React Native Cookbook by Crysfel Villa, Stan Bershadskiy

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

Creating a Facebook reactions widget

In this recipe, we will create a component similar to the Facebook's reaction widget. We will have a like button image, when pressed we will show four icons with a slide-in animation and opacity from 0 to 1.

Getting ready

Let's create an empty app called FacebookReactions; feel free to use any other name, just make sure to use the correct one when registering the bootstrap component.

We are going to need some images to display a fake timeline, a picture of your cat will work, just make sure it's about 900x600 pixels or so. We also need five icons to display the emotions, such as like, angry, laughing, heart, and surprised. Feel free to use your own assets or download the ones provided with this book.

Let's create ...

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