/react-native-navigation-starter

Simple yet practical starter with React Native Navigation v4, MobX-State-Tree and Redux (pick one) and more goodies inside

Primary LanguageTypeScriptMIT LicenseMIT


Simple yet practical starter with React Native Navigation v4, MobX-State-Tree and Redux (pick one) and more goodies inside.

It is a basic Reddit App implementation (list of subreddits and news only) where the main goal to achieve was usage of functional components with React Native Navigation. So no more class MyComponent extends React.Component { ... }, only functions with React Hooks and native navigation. The app logic is written in two ways: using MobX-State-Tree in /srcMobX folder and using Redux in /srcRedux folder. You can find instructions for launching the app using one or another way in index.js file. So now you are free to choose any option you love and stick with it!


and pick your favourite state management tool (examples inside)
MOBX REDUX
MobX - simple, scalable state management Redux - a predictable state container
MobX React - official React bindings for MobX React Redux - official React bindings for Redux
MobX State Tree (MST) - opinionated, transactional, MobX powered state container Redux Saga - side effect model for Redux apps
Persistence and Hydration are done by our hands Redux Persist - persist and rehydrate a Redux store

Getting Started

  1. Clone the repo
git clone https://github.com/kanzitelli/react-native-navigation-starter.git new-project
  1. Install packages
cd new-project
npm i
cd ios/ && pod install && cd ../
  1. Rename the app using react-native-rename if needed. If you do so, don't forget to run cd ios/ && pod install && cd ../ when the process is finished. Also keep in mind that bundle identifier must be valid for both platforms or change it manually.

  2. Run it!

react-native run-ios # or react-native run-android

Todos

There are still some things I would like to add to the starter:

  • Continous delivery via Codepush.
  • Styles using Styled Components.
  • Maybe something else. Feel free to open an issue for suggestions.

License

This project is MIT licensed