The alternative to good architecture is always bad architecture.
There is no such thing as no architecture.
-Walter White
Infopedia is a starting point for React Native application. This project is configured with redux, redux saga, redux thunk and axios. Latest version of react-navigation with NavigationService instead of Redux Integration.
This Type based Architecture scales smoothly for small - medium apps. If you guys are building a very large application I would suggest using the following feature based architecture which will be more developer friendly with ease of scaling.
- Redux
- Redux Saga
- Redux Thunk
- React Navigation
- React Native Gesture Handler
- Axios
- Eslint (Airbnb config)
- Node v8.10 (it is recommended to install it via NVM)
- Yarn
- A development machine set up for React Native by following these instructions
-
Clone this repo,
https://github.com/adityasonel/infopedia.git <your project name>
-
Go to project's root directory,
cd <your project name>
-
Remove
.git
folder,rm -rf .git
-
Open
package.json
and change thename
property with your project name -
Open
index.js
and replace'Infopedia'
by your project name -
Open
app.json
and replace'Infopedia'
by your project name -
Run
yarn
ornpm install
to install dependencies -
Run
react-native eject
to upgrade and add iOS & Android Folders. -
Run
react-native link
-
Latest versions of react-naviagtion uses gesture handler which is native module. For android you have to do some additional steps to configure them. Follow these instructions
FYI: Navigation should work fine even without these but when u need gestures or drawer navigation you need this setup
- Start the packager with
npm start
- Connect a mobile device to your development machine
- Run the test application:
- On Android:
- Run
react-native run-android
- Run
- On iOS:
- Open
ios/YourReactProject.xcodeproj
in Xcode - Hit
Run
after selecting the desired device
- Open
- Enjoy!!!
PRs are welcome
Hit me on