我想知道https://redux.js.org/basics/example-todo-list上官方rootReducer
待办事项清单示例中如何使用redux
。 rootReducer
传递到商店后,似乎没有调用reducer。
import React from 'react'
import { render } from 'react-dom'
import { Provider } from 'react-redux'
import { createStore } from 'redux'
import rootReducer from './reducers'
import App from './components/App'
const store = createStore(rootReducer)
render(
<Provider store={store}>
<App />
</Provider>,
document.getElementById('root')
)