bartlett705 / voter-info

get gov't critter info for a given address using redux-thunk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Voter-info

This simple react-redux app demonstrates the minimal usage of redux-thunk to handle async actions in react-redux.

The redux action-creator in src/actions.js fetchReps() is a thunk, which:

  • Dispatches REQUEST_REPS action to set a loading state
  • uses the fetch API to make an AJAX call
  • Dispatches RECEIVE_REPS from within the .then() handler attached to the AJAX call, passing received data to the reducer for hydration into the store.

About

get gov't critter info for a given address using redux-thunk

License:Other


Languages

Language:JavaScript 85.2%Language:CSS 12.0%Language:HTML 2.8%