Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Why the generic type passed is not used in the state changes observable type return?
In this case above, I can't take advantages as vscode autocomplete, I needed to create another observable called
I was thinking about to send a PR but maybe there is a reason for it.
Are there any reasons why there is no generics usage?
Someone else asked about this awhile neck as well:
Users can define a stateSliceSelector() function which can return a slice of state from the store when the state changes. Since there's no way to know what they'll pass back if that function is defined (it's optional, but has to be considered for this scenario), using T wasn't an option.
I normally define the type when subscribing which removes the need for what you mention above.
I'm open to ideas though if you come up with a way to handle that while preserving the functionality of the stateSliceSelector() option.