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

Using flexbox to create a profile page

In this recipe, we will learn about flexbox. In the previous recipes in this chapter we've been using flexbox to create some layouts, but in this recipe we will focus on the properties we have at our disposal to create a profile page.

Getting ready

We need to create an empty app using the React Native CLI--let's name it SimpleLayout. We are going to use a few icons and an image to show in the profile page. You can use your own or download the assets for this recipe.

How to do it...

  1. Let's start by creating an src folder in the root of the project. Then we need to create the MainApp.js file where we are going to define the code for this recipe.
  2. In the new file, let's import the dependencies of our class, just a ...

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