Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve with-redux example #4377

Merged
merged 1 commit into from
May 15, 2018

Conversation

yhirano55
Copy link
Contributor

Summary

It's better that Counter behave not only increment (add) but also decrement or reset.

  • Add decrement, reset handlers and rename add handler in components/counter.js
  • Add increment, decrement, reset actions to store.js
  • Rename page component class name: Counter => Index in pages/index.js
  • Remove needless dispatch count event on getInitialProps in pages/index.js
  • Format JSX to be readable in pages/_app.js
  • Remove needless line from components/examples.js
  • Remove needless spaces in lib/with-redux-store.js

Screenshot

After

capture

Before

capture

It's better that Counter behave not only `increment (add)` but also `decrement` or `reset`.

* Add decrement, reset handlers and rename add handler in `components/counter.js`
* Add increment, decrement, reset actions to `store.js`
* Rename page component class name: Counter => Index in `pages/index.js`
* Remove needless dispatch count event on getInitialProps in `pages/index.js`
* Format JSX to be readable in `pages/_app.js`
* Remove needless line from `components/examples.js`
* Remove needless spaces in `lib/with-redux-store.js`
Copy link
Member

@timneutkens timneutkens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍

@timneutkens timneutkens merged commit 3db3f4b into vercel:canary May 15, 2018
@yhirano55 yhirano55 deleted the improve-with-redux-example branch May 15, 2018 07:50
lependu pushed a commit to lependu/next.js that referenced this pull request Jun 19, 2018
It's better that Counter behave not only `increment (add)` but also `decrement` or `reset`.

* Add decrement, reset handlers and rename add handler in `components/counter.js`
* Add increment, decrement, reset actions to `store.js`
* Rename page component class name: Counter => Index in `pages/index.js`
* Remove needless dispatch count event on getInitialProps in `pages/index.js`
* Format JSX to be readable in `pages/_app.js`
* Remove needless line from `components/examples.js`
* Remove needless spaces in `lib/with-redux-store.js`
Rokt33r added a commit to Rokt33r/next.js that referenced this pull request Jun 30, 2018
Rokt33r added a commit to Rokt33r/next.js that referenced this pull request Jun 30, 2018
timneutkens pushed a commit that referenced this pull request Jun 30, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants