传递到商店后,如何在redux中调用reducer?

时间:2018-06-22 14:23:27

标签: javascript reactjs redux

我想知道https://redux.js.org/basics/example-todo-list上官方rootReducer待办事项清单示例中如何使用reduxrootReducer传递到商店后,似乎没有调用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')
)

0 个答案:

没有答案