Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
c4436359
Commit
c4436359
authored
May 25, 2017
by
João Carmona
Committed by
Tim Neutkens
May 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(with-redux): add redux tools to example (#1994)
parent
15e9573d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
package.json
examples/with-redux/package.json
+1
-0
store.js
examples/with-redux/store.js
+2
-1
No files found.
examples/with-redux/package.json
View file @
c4436359
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
"next"
:
"latest"
,
"next"
:
"latest"
,
"next-redux-wrapper"
:
"^1.0.0"
,
"next-redux-wrapper"
:
"^1.0.0"
,
"react"
:
"^15.4.2"
,
"react"
:
"^15.4.2"
,
"redux-devtools-extension"
:
"^2.13.2"
,
"react-dom"
:
"^15.4.2"
,
"react-dom"
:
"^15.4.2"
,
"react-redux"
:
"^5.0.1"
,
"react-redux"
:
"^5.0.1"
,
"redux"
:
"^3.6.0"
,
"redux"
:
"^3.6.0"
,
...
...
examples/with-redux/store.js
View file @
c4436359
import
{
createStore
,
applyMiddleware
}
from
'redux'
import
{
createStore
,
applyMiddleware
}
from
'redux'
import
{
composeWithDevTools
}
from
'redux-devtools-extension'
import
thunkMiddleware
from
'redux-thunk'
import
thunkMiddleware
from
'redux-thunk'
const
exampleInitialState
=
{
const
exampleInitialState
=
{
...
@@ -39,5 +40,5 @@ export const addCount = () => dispatch => {
...
@@ -39,5 +40,5 @@ export const addCount = () => dispatch => {
}
}
export
const
initStore
=
(
initialState
=
exampleInitialState
)
=>
{
export
const
initStore
=
(
initialState
=
exampleInitialState
)
=>
{
return
createStore
(
reducer
,
initialState
,
applyMiddleware
(
thunkMiddleware
))
return
createStore
(
reducer
,
initialState
,
composeWithDevTools
(
applyMiddleware
(
thunkMiddleware
)
))
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment