Skip to content

Commit

Permalink
Merge pull request #4673 from Twintails/patch-1
Browse files Browse the repository at this point in the history
Closes #4672 Update combineReducers.md
  • Loading branch information
EskiMojo14 committed Jan 31, 2024
2 parents 936e134 + ef9eee6 commit 02073c4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/api/combineReducers.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function counter(state = 0, action) {
#### `reducers/index.js`

```js
import { combineReducers } from 'redux'
import { combineReducers } from '@reduxjs/toolkit'
import todos from './todos'
import counter from './counter'

Expand All @@ -130,10 +130,12 @@ export default combineReducers({
#### `App.js`

```js
import { createStore } from 'redux'
import { configureStore } from '@reduxjs/toolkit'
import reducer from './reducers/index'

const store = createStore(reducer)
const store = configureStore({
reducer
})
console.log(store.getState())
// {
// counter: 0,
Expand Down

0 comments on commit 02073c4

Please sign in to comment.