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(routing): warn if initialUiState is used #6238

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jun 17, 2024

Summary

If you use initialUiState, as well as routing, you can get some confusing situations where the state is overridden, only if routing actually has some state. This can be very sporadic depending on your setup, and thus confusing.

Result

CR-6027 is somewhat handled, documentation still needed.

If you have any state set in intialUiState (not an empty object), you will receive a warning upon initialisation of InstantSearch with routing.

@Haroenv Haroenv requested review from a team, dhayab and sarahdayan and removed request for a team June 17, 2024 08:44
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9baeb47:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv Haroenv merged commit 7b4cc3f into master Jun 17, 2024
12 checks passed
@Haroenv Haroenv deleted the fix/routing-warn-ui-state branch June 17, 2024 09:29
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.

None yet

3 participants