Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 1.25 KB

File metadata and controls

42 lines (28 loc) · 1.25 KB

Flux Lab

Full Stack, March 12, 2015

You can see the final product on the finished branch.

Getting started

  • Clone this repo and go to it:

    cd ~/code # or wherever you keep code
    git clone git@github.com:fullstacktalks/react-flux-starter.git
    cd react-flux-starter
    
  • Start a web server:

    python -m SimpleHTTPServer 8000
    
  • Open the project in a browser (http://localhost:8000/lab/):

    image

  • Open the project in your code editor.

Tasks

  1. Display the currently selected city. You'll need to:
  • Create a new React component called Display
  • Render that component into #display
  • Make the component read its state from SelectedValueStore
  • Make the component listen for changes from SelectedValueStore
  1. Display the number of times a selection has been made. You'll need to:
  • Add a new store for this value, SelectionCountStore
  • Make the store listen for VALUE_WAS_SELECTED in the dispatcher
  • Use those events to update the store's value and update subscribers
  • Display that value in your new component