dphilipson / typescript-fsa-reducers

Fluent syntax for defining typesafe reducers on top of typescript-fsa.
MIT License
220 stars 16 forks source link

Compatibility with ngrx 4 #18

Closed st-clair-clarke closed 7 years ago

st-clair-clarke commented 7 years ago

Given the changes with ngrx 4, is typescript-fsa-reducers still compatible? There are changes with Actions (for example, there is no payload property). How does this impact on this package?

See migration guide at https://github.com/ngrx/platform/blob/master/MIGRATION.md

Thanks

dphilipson commented 7 years ago

Hi st-clair-clarke,

I'm not familiar with ngrx so I may be misinterpreting, but my understanding of what they are saying is that the parent interface Action no longer has a payload field on it, but specific subtypes of it will. In the example in the migration guide, UserActions.Login, which I assume is a subtype of Action, still has a payload field. If this is indeed the case, then this library should continue to be perfectly compatible, as there is no circumstance where it is necessary to access a payload field without first being sure of what specific action subtype an object is an instance.

Let me know if this is wrong for some reason, but my understanding is that the ngrx change should not affect the usage of this library.

dphilipson commented 7 years ago

Closed for inactivity. Feel free to reopen if you have additional comments.