@vikas' answer put me on the right track to solve a similar issue.
I'm trying to handle an upload, where I want to display the progress:
- From the UploadComponent, I emit an event to the parent
- The parent dispatch an action to the store
- An effect catches the action, call the service to upload the file (which returns an array with two observables: progress$ and result$)
- The effect dispatch an HttpProgress action which contains the observable
And at this point I had a similar issue. After digging into store freeze code, a coworker and I found out that it also deep freeze the action.payload. And thus, passing an observable results into an error as observable state is mutated internally.
I'm not using the payload to keep it into the store, just so I can register to actions$ within my component so here it doesn't matter if I pass a mutable object into the payload. To avoid that error, I just wrapped the observable into a function as deep freeze do not freeze functions.
onClickfunctionthis.selectedDateis somehow put in an action payload and assigned to the state in a reducer you won't be able to modify it directly without another action going through the pipeline.Object; at that point you might as well useanyand be done with it. IOW, useselectedDate: { date: Date, pristine: Date }(or whatever your properties are).