摘要:
(个人复习时使用) 1.配置提供器 import React from 'react'; import ReactDOM from 'react-dom'; import TodoList from './TodoList' import { Provider} from 'react-redux' 阅读全文
摘要:
1.配置store下的index.js文件 import { createStore , applyMiddleware ,compose } from 'redux' // 引入createStore方法 import reducer from './reducer' import saga fr 阅读全文
摘要:
redux-thunk 就是让store.dispatch()中可以传函数了,以前传的都是对象(百度到的介绍,供个人复习便于理解) 官方文档 const store = createStore( reducer, applyMiddleware(thunk) ) 因为createStore中只能放两 阅读全文