1.createStore(创建store)
const store =createStore(
reducer
);2.Store.dispatch(把action传递给store)
handleBtnClick() {
const action =getAddItemAction();
store.dispatch(action);
}3.Store.getState(获取store中的所有数据内容)
handleStoreChange() {
this.setState(store.getState());
}4.Store.subscribe(监听store数据的改变)
store.subscribe(this.handleStoreChange);