Guest User

Untitled

a guest
Jan 18th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. // Create your store passing it your reducer
  2. const store = Redux.createStore(counter);
  3. // Set value element to the current state (count)
  4. const render = () => {
  5. document.getElementById('value').innerHTML = store.getState().toString();
  6. }
  7. render();
  8. // Subscribe our render method to the store so it executes when a value is changed
  9. store.subscribe(render);
Add Comment
Please, Sign In to add comment