Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Counter extends React.Component {
- state = ({
- title: "Title",
- ...counter(undefined, {})
- });
- dispatch(action) {
- this.setState(prevState => ({...this.state, ...counter(prevState, action)}));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement