Skip to content

netguru-training/workshops-rn-2

Repository files navigation

Netguru Workshops

Prerequisites
Optional prerequisites:
$ brew install watchman
Instalation
  1. Clone the repo:
$ git clone [email protected]:netguru-training/workshops-rn-2.git
$ cd workshops-rn-2
  1. Install dependencies:
$ yarn
Running/Development
  1. Build and run iOS app
$ yarn ios

After build is finished just run native app 2. Build and run Android app

$ yarn android

After build is finished just run native app 3. Clean cache

$ yarn clean
Running Tests
  1. Run project tests
$ yarn test
  1. Run eslint code syntax tests
$ yarn lint
Code Style

ESLint config - based on Airbnb style guide, you can add few of your own rules in .eslintrc file

File structure - Just a proposal
  • assets

Here you can store all images, fonts and icons

  • app

Main application folder

  • redux

Inside redux each folder name indicates a store property that contain actions, reducers and constants

  • components

Maximum Code Reuse and Minimize Component State. In this directory we’ll be writing mostly functional components that can be used in multiple places throughout our app

  • config

This directory aligns with our goal to Keep Configuration out of the Code. We keep here for example colors, messages etc.

  • lib

We’re just keeping any general functions in here.

  • screens

These screens are essentially “smart” container component that handle all of the data fetching, interaction management, etc. The actual UI is delegated down to the various presentation components in the components directory.