Commit graph

18 commits

Author SHA1 Message Date
Joe Haddad
18a9c7e371
Improve linting rules to catch more errors (#9374)
* Update `packages/`

* Update examples

* Update tests

* Update bench

* Update top level files

* Fix build

* trigger
2019-11-10 19:24:53 -08:00
Henrik Wenz
b5da739f56 Simplify with-redux example (#8875)
## Changes

- [x] Remove _app.js usage
- [x] Migrate withRedux HOC to functional component
- [x] Add correct display name
- [x] Remove abstractions/boilerplate from example
- [x] Add useInterval HOC from Dan
2019-10-01 12:11:20 -05:00
Tim Neutkens
a90a55545b
Deprecate Container usage (#8327)
* Remove Container from examples

* Update readme to reflect Container removal
2019-08-11 22:02:33 +02:00
Corbin Crutchley
e03266008c form handler example: Update deps and fix build from dep update (#6732)
* form handler example: Update deps and fix build from dep update

* Ran lint error fixers

* Fixes errors that occur when commit occurs

* Commit linter fixes
2019-03-27 16:12:45 -04:00
Michele Salvini
affe356a90 Pass mapDispatchToProps as an object (#6786)
wrapping `startClock` in `bindActionsCreator` there's no need to pass `dispatch` in:
```
this.props.startClock(dispatch)
```
Furthermore `bindActionsCreator` is not needed because following already bind actions:
```
const mapDispatchToProps = {
  startClock
};
```
2019-03-26 12:28:18 +01:00
Ravinder Mahajan
1c31d79c38 Creating one more example which only uses redux and no thunk as middl… (#6636)
Adding one more example which only uses redux and not thunk. This helps a lot for a beginner to understand basic redux first.
2019-03-14 17:40:00 +01:00
Tim Neutkens
9c4eefcdbf
Add prettier for examples directory (#5909)
* Add prettier for examples directory

* Fix files

* Fix linting

* Add prettier script in case it has to be ran again
2018-12-17 17:34:32 +01:00
yhirano55
3db3f4b42a Improve with-redux example (#4377)
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`
2018-05-15 09:49:07 +02:00
Tim Neutkens
0697c289f8
Implement with-redux using _app.js (#4295)
* Simplify redux example

* Simplify redux example even more

* Remove empty space
2018-05-07 15:03:54 +02:00
Ondrej Maksi
359e25af13 extendable with-redux example (#3947)
* copied with-redux -> with-redux-wrapper, changed links in readme

* added simplified redux wrapper

* removed next-redux-wrapper dep

* changed imports to local wrapper

* changed readme to reflect changes
2018-03-06 13:34:28 +01:00
Denis Lukov
726499ff14 Clear missed interval (#2611)
* clear missed interval

* remove trailing whitespace
2017-08-13 15:44:14 +02:00
spencer
2e7bc1074d Update to examples: with-redux (updated) (#1813)
* With-Redux-example-update-request

Hello Next.js,

I’ve added an additional example to “With-Redux” and updated some of
the original code to help illustrate to less inexperienced developers
how to implement Redux with Next.js.

The example is a simple counter to help reinforce how the client and
server renderings work together. In addition I also updated some of the
redux boilerplate code to help fully demonstrate how redux can be
implemented when using is with Next.js

Please contact me at spencer.bigum@gmail.com for further questions or
anything else you might need.

Thanks,
Spencer

* fixed listing issues: examples/with-redux

* Updated code based on @impronunciable Feedback
2017-04-30 17:44:24 -03:00
Tim Neutkens
e5844314e3 Fix linting errors (#1197) 2017-02-18 20:12:19 +01:00
Guillermo Rauch
47e5231cdd Revert "Use the original idea of provider wrapper for redux example (#1201)"
This reverts commit ba54c6ac3d.
2017-02-18 14:11:54 -03:00
胡子大哈
ba54c6ac3d Use the original idea of provider wrapper for redux example (#1201)
Use the original idea of provider wrapper from #1193 and remove
unnecessary `initStore` in every page.
2017-02-18 14:03:02 -03:00
Kirill Konshin
f0cb5b71a0 Added next-redux-wrapper to example (#1196)
* Added next-redux-wrapper to example

* Docs, renamed withRedux
2017-02-18 01:10:27 -03:00
Bernat Orell
3b1f7115a3 Routing on the client with Redux (#691)
* Routing on the client with Redux

* Removing unused import
2017-01-08 07:04:35 -08:00
Dan Zajdband
c5d69f0585 Add/move examples (#470)
* Added redux and styled components (wip) examples.

* Updated examples readmes and package.json

* Fixed styled-components example
2016-12-21 21:10:54 -08:00