This project aims to be a strong foundation for react-native applications. It provides a clear and organized structure
- axios - For network calling.
- react-navigation - Application navigation.
- redux - Application state management.
- redux-persist - Persist redux state.
- redux-thunk - Enabling asynchronous dispatching of actions.
You can start by cloning this repository and using react-native-rename. In the current state of this project, it should give you no issues at all, just run the script, delete your node modules and reinstall them and you should be good to go.
Keep in mind that this library can cause trouble if you are renaming a project that uses Pods
on the iOS side.
After that you should proceed as with any javascript project:
- Go to your project's root folder and run
npm install
. - If you are using Xcode 12.5 or higher got to /ios and execute
pod install --
repo-update` - Run
npm run ios
ornpm run android
to start your application!
(Using yarn: yarn ios
or yarn android
)
If you want to roll on your own and don't want to use this as a template, you can create your project and then copy the /src
folder (which has all the code of your application) and update your index.js
.
Keep in mind that if you do this, you'll have to install and link all dependencies (as well as adding all the necessary native code for each library that requires it).
This template follows a very simple project structure:
assets
: Asset folder to store all images, vectors, fonts, etc.src
: This folder is the main container of all the code inside your application.components
: Folder to store any common component that you use through your appconstants
: Folder to store any kind of constant that you have.routes
: Folder to store the navigators.redux
: This folder should have all your reducers and storescreens
: Folder that contains all your application screens/features.helper
: Define helper functions in this folder.utils
: Folder to store any common function such as Analytics, Logger, DateTime, and etc.
App.js
: Main component that starts your whole app.index.js
: Entry point of your application as per React-Native standards.
Modify the environment variables files in root folder (.env
)
The idea of this section is to explain how the template composition is the best and easiest to use when you try to use well-formed, architectures, especially using redux flow.
The template follows a simple and convenient exporting pattern. The folder index exposes the resources, allowing to import all from the same path.
If you like this project then give it a Github star by pressing the Star button ⭐
I'm currently looking for good Freelance and Contract-based work remotely (worldwide). So, if you have a good opportunity that matches my skills experience then you can contact me on my Linkedin or my email id rushitjivani1999@gmail.com 🙌