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
For features that do not need storage, I can wrap the feature name and reducer into a single FeatureSlice object, which reduces the amount of stuff I need to import and helps avoid name conflicts when there are multiple slices
Is there a way to do something similar but still be able to use initialState and metaReducers?
The best I could come up with is to manually wrap them around the reducer function, essentially re-implementing bits of NgRx which do the same thing for me
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm currently using NgRx store with https://github.com/btroncone/ngrx-store-localstorage a lot, which means my feature state slices get provided like this:
For features that do not need storage, I can wrap the feature name and reducer into a single FeatureSlice object, which reduces the amount of stuff I need to import and helps avoid name conflicts when there are multiple slices
Is there a way to do something similar but still be able to use
initialState
andmetaReducers
?The best I could come up with is to manually wrap them around the reducer function, essentially re-implementing bits of NgRx which do the same thing for me
platform/modules/store/src/utils.ts
Line 144 in 4fb78f1
Beta Was this translation helpful? Give feedback.
All reactions