Skip to content

nattatorn-dev/currency-exchange

Repository files navigation

React Universal Saga (currency-exchange)

Build Status GitHub license

Getting Started

Universal React App Starter featuring Redux Saga. Heavily modified version of React Redux Universal Hot Example combined with Redux Saga real-world example.

$ git clone https://github.com/nattatorn-dev/currency-exchange

$ cd currency-exchange && sudo yarn install

$ sudo yarn run dev (run in development mode)

Live Demo: currency-exchange-rate.herokuapp.com

Features

Server-side Data Fetching

The redux-saga provides a mechanism for server-side data fetching from the actual backend API servers/services, when it reaches client-side (React) there is no need to do additional network call. You have to define the Sagas that a container need (refers to containers/UserPage.js > UserPage.preload for example) for server-side to fetch. PS: You have the flexibility to implement additional logic (e.g. handle authentication) when fetching data at server-side rendering stage, as it differs from client-side.

Unit Tests

The project uses Jest to run your unit tests and the Test Utilities from Facebook api.

An example is available at components > User.

To run the tests in the project, just simply run yarn run test.

Any contribution is welcome.

Cheers, nattatorn-dev @maybenexttime