Every time I needed to create a new React Native application, I was starting from scratch, with the architecting, designing and piecing everything together. I needed to create a reusable template with all that, and as well other things I might need.
What it does
It provides a template which one can use to quickly start building their React Native application.
How I built it
I bootstrapped a new React Native application, and put in all the pieces like global stores management with MobX, routing and navigation with React Navigation, and an encompassing architecture and design philosophy on the project, that can be followed as I build future React Native applications, off of this template.
Challenges I ran into
Before building this template, I had already built a similar one for React for the web starter template. In web, I was persisting my global state (stores) to "localStorage" for offline functionality. And I could also set automatic persistence of all stores with "onload" of the web app. But here in React Native for mobile devices I have had to find a way to perform persistence, only when requested. This actually ended up teaching me how to do the same for the React web apps template.
Accomplishments that I'm proud of
The design I have implemented for managing global app state (stores) and their persistence to _ AsyncStorage _. This facilitates offline capability. I using MobX for global state management, but can be replaced with any other library on top of this same architecture and design. Also my design and architecture of named routes for the views, here in this template applied on top of React Navigation, and it is also agnostic of the routing and navigation library, and can be applied on any routing and navigation library. This is the culmination of close to 4yrs of building applications with React Native.
What I learned
I learned a little more about React Hooks and also improved my Typescript skills.
What's next for Architecting and Designing a React Native Application
I want to build a CLI and maybe even a desktop studio, which future users can use with "low-code" to build even quicker, their React Native applications, based of the design and architecture from this template.