Open rainerhahnekamp opened 6 months ago
A question that might not be related: why do we need the actions to be internal to the store? Why not have external actions created with the createAction
function?
This way we can save the actions on a separate file and cleanup the store.
Yeah, that's planned in #3
We initialize already our state with properties like:
withState({flights: [] as Flight[]})
On the other hand, an action requires a payload function (or props in NgRx Global Store):
withRedux({actions: {search: payload<{from: string, to: string>()}})
What if we introduce a second approach with type inference like:
withRedux({actions: {search: {from: '', to; ''}}})
For more complicated cases,
payload
will still be an option.