Closed maxime1992 closed 6 years ago
Your enableBatching
meta-reducer needs to be wrapped in an exported function for AOT
// ------------------------------------------------------------------------------
export function batcher(reducer) {
return enableBatching(reducer);
}
// if environment is != from production
// use storeFreeze to avoid state mutation
const metaReducersDev = [storeFreeze, batcher];
// enableBatching allows us to dispatch multiple actions
// without letting the subscribers being warned between the actions
// only at the end : https://github.com/tshelburne/redux-batched-actions
// can be very handy when normalizing HTTP response
const metaReducersProd = [batcher];
export const metaReducers = environment.production
? metaReducersProd
: metaReducersDev;
Thanks a lot for helping on this one @brandonroberts! I'll take a look ASAP :smile:
@brandonroberts just updated to latest versions of Effects and Store, didn't touched anything more and it's now working well :tada: :smile:
👍
There are compatibility issues with ngrx v4 and AOT.
While those 2 are not playing well together, this PR should be on hold.
https://github.com/ngrx/platform/issues/189