/user-login-reactjs-react-native

A common repo for reactjs and react native

Primary LanguageTypeScript

Note1:- Both mobile and web part of assignment in the same repo

Note2:- Used mockapi.io to store & fetch data

Fact

Amount of code shared between web and mobile is as below:-

  1. Redux store
  2. Redux actions
  3. Network layer
  4. Styled component
  5. Error handling
  6. Theming
  7. logic shared

Only UI and navigation is different in web and mobile.

Getting Started

Note: Make sure you have completed the React Native - Environment Setup instructions till "Creating a new application" step, before proceeding.

Step 1: Clone repo

First, Clone repo (git clone https://github.com/codesinghanoop/user-login-reactjs-react-native.git)

Step 2: Install packages

Install packages by running yarn install Start metro server by running yarn start

For Android

# using npm
npm run android

# OR using Yarn
yarn android

For iOS

To install pods run:

pod install
# using npm
npm run ios

# OR using Yarn
yarn ios

For Web

# 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.