You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to use this library with .component in Angular 1.5? I'm getting the error warning.js:14 Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers., which seems odd. Here's some code
home.component.js
import*asPhotoActionsfrom'actions/photo.actions';importtemplatefrom'./home.component.html';classHomeController{constructor($ngRedux,$scope){constunsubscribe=$ngRedux.connect(this.mapStateToThis,PhotoActions)(this);$scope.$on('$destroy',unsubscribe);}// Which part of the Redux global state does our component want to receive?mapStateToThis(state){return{photos: state.photos};}}exportconsthomeComponent={template: template,controller: HomeController};
This is attached to a module, .component('homeComponent', homeComponent). All registers just fine, and if I remove the ngRedux code it renders fine.
I have a photos.reducer, which is exported using combineReducers:
Is it possible to use this library with
.component
in Angular 1.5? I'm getting the errorwarning.js:14 Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.
, which seems odd. Here's some codehome.component.js
This is attached to a module,
.component('homeComponent', homeComponent)
. All registers just fine, and if I remove the ngRedux code it renders fine.I have a
photos.reducer
, which is exported usingcombineReducers
:...and then exported as
rootReducer
fromreducers/index.js
here.And in the config phase, I register everything.
Am I doing something wrong, or can this library just not be used with
.component
and onlydirective
?The text was updated successfully, but these errors were encountered: