We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using the custom onStateChange() implementation together with URL routing the router is not called upon UI state changes.
onStateChange()
Steps to reproduce the behavior:
Without custom onStateChange() everything works as expected:
https://codesandbox.io/s/inspiring-carson-tc2sv?file=/src/app.js:215-291
Enable the custom onStateChange() and the router stops working:
https://codesandbox.io/s/inspiring-carson-tc2sv?file=/src/app.js
The router is expected to work identically, based on the router configuration, when a custom onStateChange function is either defined or not.
onStateChange
4.24.0-experimental-typescript.0
The text was updated successfully, but these errors were encountered:
Hi @JJWesterkamp thanks for reaching out, and providing an example. Thats looks like a regression.
@algolia/instantsearch-for-websites we should file bug for this one. I've reproduced it in this integration test https://github.com/algolia/instantsearch.js/compare/chore/regression-test-onstatechange-middleware As a workaround for @JJWesterkamp, can we suggest using one of the following?
onStateChange({ uiState, setUiState}) { setUiState(nextUiState) // add this this.middleware.forEach(({ instance }) => { instance.onStateChange({ uiState: nextUiState, }); }); }
Sorry, something went wrong.
@tkrugg Thanks for your reply. The workaround does the trick for now, thanks again!
Successfully merging a pull request may close this issue.
馃悰 Bug description
When using the custom
onStateChange()
implementation together with URL routing the router is not called upon UI state changes.馃攳 Bug reproduction
Steps to reproduce the behavior:
onStateChange()
functionLive reproduction
Without custom
onStateChange()
everything works as expected:https://codesandbox.io/s/inspiring-carson-tc2sv?file=/src/app.js:215-291
Enable the custom
onStateChange()
and the router stops working:https://codesandbox.io/s/inspiring-carson-tc2sv?file=/src/app.js
馃挱 Expected behavior
The router is expected to work identically, based on the router configuration, when a custom
onStateChange
function is either defined or not.Environment
4.24.0-experimental-typescript.0
The text was updated successfully, but these errors were encountered: