This project runs on React Native.
The objective of this repo is to display the correct way to use redux along with a middleware for side-effects.
tl;dr: if you are here to check it, main code is on the store folder
Clone this repository and then install all dependencies by running:
yarn && yarn android
If you want to run it on android, type the command:
yarn android
If you are on a macOS machine and want to run it in a iOS simulator, you first need to run:
cd ios && pod install
After completing this, you can:
yarn ios
- O React Native foi utilizado em sua versão 0.63.2.
- The app is build using Typescript, it grants bring static typing for javascript, granting us the ability to use the intelisense for our code editor, facilitates the refactoring of code, saves us debuging time and brings more assertiveness when accessing properties of our variables.
- Interfaces were created with payload responsed from the API, so the whole application is aware of it's data structure.
- redux for state management of the application.
- redux-saga middleware for managing side-effects on redux store.
- styled-components to simplify separation between code and stylesheets.
It is always important to follow a certain pattern when developing. It makes the code more readable and assists new joining programmers to ramp up faster when getting in touch with the code for the first time.
As this repository is made only to display the use of side-effects, I followed the duck pattern
, a very common pattern for developers working on redux, suggested by the own creator.