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 ...