Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. class Counter extends React.Component {
  2. state = ({
  3. title: "Title",
  4. ...counter(undefined, {})
  5. });
  6.  
  7. dispatch(action) {
  8. this.setState(prevState => ({...this.state, ...counter(prevState, action)}));
  9. }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement