Conversation
- Fix Bug multiple StateOf had its change callback overriten when different state used different routes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
v2.1.0
Performance
IStatePulseinstance, removing the need to iterate the internal registry. The registry itself is scheduled for removal in version 3.0 and is now marked with the appropriateObsoleteattribute. Cleanup is no longer driven by a continuous loop; instead, the tracker schedules a self‑check only when activity occurs in the registry and goes idle when the application becomes inactive. This preserves memory‑leak protection without a permanent cycle. A minimum delay of 10 seconds is enforced between checks, and when burst activity occurs, only the final activity triggers a single final cleanup run rather than multiple redundant executions.Fix
This is one of those “bug or feature?” situations. By design,
StateOf<TState>()is meant to notify the component when its state changes. However, earlier Blazor assumptions overlooked scenarios where one state might render through one route while another state uses a different route.Before version 2.0.11, StatePulse always treated the latest route as the default route for all states registered by a component, this is was BUG. Starting with 2.0.11, each state that a component subscribes to StatePulse now respects those route differences if any.