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(state): change behaviour of preserveSharedStateOnUnmount #6488

Merged
merged 2 commits into from
Dec 26, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Dec 20, 2024

With preserveSharedStateOnUnmount behavior, UI State is the source of truth, when a widget gets removed, the UI State is evaluated again and the parameters result out of that.

FX-3192

Not done in this PR yet:

  • changed the signature of dispose (no more helper and state)
  • implement a similar behavior for recommend

BREAKING CHANGE: The option future.preserveSharedStateOnUnmount is removed and now behaves as if it was set to true

With preserveSharedStateOnUnmount behavior, UI State is the source of truth, when a widget gets removed, the UI State is evaluated again and the parameters result out of that.

[FX-3192]

Not done in this PR yet:
- changed the signature of dispose (no more helper and state)
- implement a similar behavior for recommend

BREAKING CHANGE: The option `future.preserveSharedStateOnUnmount` is removed and now behaves as if it was set to `true`
@Haroenv Haroenv added this to the instantsearch.js v5 milestone Dec 20, 2024
@Haroenv Haroenv requested review from dhayab and sarahdayan December 20, 2024 12:47
Copy link

codesandbox-ci bot commented Dec 20, 2024

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 d0288d8:

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 85c3bd1 into next Dec 26, 2024
10 checks passed
@Haroenv Haroenv deleted the feat/future-preserve branch December 26, 2024 14:23
Haroenv added a commit that referenced this pull request Dec 26, 2024
With preserveSharedStateOnUnmount behavior, UI State is the source of truth, when a widget gets removed, the UI State is evaluated again and the parameters result out of that.

[FX-3192]

Not done in this PR yet:
- changed the signature of dispose (no more helper and state)
- implement a similar behavior for recommend

BREAKING CHANGE: The option `future.preserveSharedStateOnUnmount` is removed and now behaves as if it was set to `true`
Haroenv added a commit that referenced this pull request Dec 26, 2024
With preserveSharedStateOnUnmount behavior, UI State is the source of truth, when a widget gets removed, the UI State is evaluated again and the parameters result out of that.

[FX-3192]

Not done in this PR yet:
- changed the signature of dispose (no more helper and state)
- implement a similar behavior for recommend

BREAKING CHANGE: The option `future.preserveSharedStateOnUnmount` is removed and now behaves as if it was set to `true`
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