Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(url_hash_bindings): added debouce maxWait value for throttledSetUrlHash #644

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

chrisj
Copy link
Contributor

@chrisj chrisj commented Sep 5, 2024

without a maxWait value, debounce can cause important state changes to be lost if there is high rate of state change between the important change and a page reload

mouse movement causes state changes and is probably the main reason this can happen. I just threw in a value of double the debounce delay.

Alternatively, we could use throttle with the trailing option set to true. This should give the same behavior as using a maxWait value of updateDelayMilliseconds but maxWait allows more control with performance tuning.

…rlHash

without a maxWait value, debounce can cause important state changes to be lost if there is high rate of state change between the important change and a page reload
mouse movement causes state changes and is probably the main reason this can happen
@jbms jbms merged commit 2db9b9e into google:master Oct 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants