fix: change subscribeWithSelector API declaration #1382
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CLA
As discussed with @oliverlaz and @arnautov-anton , the current API of the state store seems very brittle for integrators and something that is very prone to errors (that we cannot easily catch). Because of that, we've decided to change the state store's API so that it no longer returns an array of sorted properties, but rather an object with named properties.
The way the API changes is as follows:
Previously:
and then use it by:
This way, we will never be completely dependant on keeping the order of the array proper and not have to worry about adding new properties to maintain the order.
Description of the changes, What, Why and How?
Changelog