DEV Community

Cover image for Bootstrapping a React Native App with Best Practices
Osama Qarem
Osama Qarem

Posted on • Updated on

Bootstrapping a React Native App with Best Practices

If you're unaware, you can create your own react native template to be consumed by the react native cli.

Since I always end up referencing old projects for some code (e.g. navigators, automation scripts) I decided I to make one and save myself the headache.

Anyway, I've been maintaining it for some time now and I'm quite happy with where it's at. I only got around to writing some docs this weekend though, which is why I feel this is a good time to share. I should also mention that it is using TypeScript.

Check it out here!


Thanks to the work by the authors of react-native-cli, using the template is as easy as:

$ npx react-native init MyApp --template @osamaq/react-native-template
Enter fullscreen mode Exit fullscreen mode

If you are just starting to learn React Native or TypeScript, I don't actually recommend this template as it could be a bit overwhelming, unless you have a native iOS or Android background.

I've put a lot of work into it, from applying best practices to writing boilerplate components/logic that you can build upon. More than anything, I love the automation scripts. Please go through the docs or codebase and let me know what you think!

If you have questions or suggestions on how it could be improved or what you'd do differently, I'd really appreciate it. Thanks!

Discussion (2)

ibrahimkamal profile image
Ibrahim Kamal

3aaaash ya Osama 💙💙

osamaqarem profile image
Osama Qarem Author