The react view is not updated (the render is never called) but the reducer was invoked.
I have the following:
1). the react view: I a field in the root state to determent if I need to show “TodoList” or “HousingInfo”
export default class RightPane extends React.Component{
static contextTypes = {
store: React.PropTypes.object
}
render(){
let store = this.context.store;
let curPage = store.getState()[“mainRightPanePage”].currentPage;
return (
2). the action dispatching
store.dispatch({‘type’:‘switchPage’, ‘pageId’:pageId});
3). the reducer: the following reducer was invoked
const mainRightPanePage = (state = {‘currentPage’:‘TodoList’}, action) => {
switch (action.type) {
case ‘switchPage’:
return Object.assign({}, state, {
currentPage: action.pageId
})
default:
return state
}
}
export default mainRightPanePage
What did I miss?
thanks