Skip to content

yury-dymov/json-api-react-redux-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON API React Redux Example

Show case for json-api-normalizer and redux-object.

DEMO - https://yury-dymov.github.io/json-api-react-redux-example/

Description

This is a demo application for HabraHabr article. A lot more details can be found there.

It represents, how data formatted with JSON API can be further converted to a more redux-friendly format with json-api-normalizer library.

The application uses https://phoenix-json-api-example.herokuapp.com/api/test as a JSON API data source, developed with Phoenix Framework. Feel free to check the API source code if desired.

You can also try the demo - https://yury-dymov.github.io/json-api-react-redux-example/.

Installation

OS X, Linux, and Windows platforms are supported. Node.js should be installed, of course.

  • Clone the repo with git clone https://github.com/yury-dymov/json-api-react-redux-example.git
  • Install dependencies with npm install
  • Build the JS with npm run build
  • Run webpack-dev-server with npm run webpack-dev-server

Now you can visit http://localhost:8050 from your browser.

Note: Internet access is required to make things work as a backend is initially deployed on Heroku. You may deploy it locally as described here and change API_ROOT variable in src/redux/middleware/api.js to make things work with no Internet access if desired.

License

MIT (c) Yury Dymov.