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

The folder structure

Structuring React Native components is important, but it's also very important to structure your folder properly. As your application grows and becomes more complex, it's harder to introduce new features without a proper folder structure.

Let's look again at the default folder structure that React Native gives us:

As we've discussed before, index.Android.js and index.ios.js are entry points for Android and iOS, respectively. We want our application to be as much cross-platform as we can, so the first thing we will do is create the following structure:

Now let's understand what is the purpose of each directory:

  • src/components ...

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