Note1:- Both mobile and web part of assignment in the same repo
Note2:- Used mockapi.io to store & fetch data
Amount of code shared between web and mobile is as below:-
- Redux store
- Redux actions
- Network layer
- Styled component
- Error handling
- Theming
- logic shared
Only UI and navigation is different in web and mobile.
Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.
First, Clone repo (git clone https://github.com/codesinghanoop/user-login-reactjs-react-native.git)
Install packages by running yarn install Start metro server by running yarn start
# using npm
npm run android
# OR using Yarn
yarn android
To install pods run:
pod install
# using npm
npm run ios
# OR using Yarn
yarn ios
# using npm
npm run start:web
# OR using Yarn
yarn start:web
If everything is set up correctly, you should see your new app running in your Android Emulator or iOS Simulator shortly provided you have set up your emulator/simulator correctly.
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.