Quick wins

When a new developer joins the project, it may be a little challenging for them to understand our code base. Let's address a few easy fixes.

To start with, where is the entry file for our application? It's in the root directory. However, there is no clear entry point in the source (src/) directory. This is okay, but it would be handy to have it close to the story and examples. At a glance, you will have examples, the storybook, and the app root to lookup.

In addition, we can refactor the current ScreenRoot component. It serves as AppRoot and is wrapped in two HOCs. As you already know, such coupling is not a good thing. I have made a little refactor. Have a look at the new structure:

The entry point to the application is now clearly ...

Get Hands-On Design Patterns with React Native now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.