Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(server): load data twice in the case of dynamic widget usage #3268

Merged
merged 4 commits into from
Jan 21, 2022

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Jan 20, 2022

Summary

Same as #3259, but for React InstantSearch core, not hooks.

We render twice in the case that dynamic widgets are discovered

Result

  • no search request when there's a refinement applied using server side rendering
  • no flash of non-filtered content
  • https://codesandbox.io/s/keen-moon-wdxou fixed by this PR (select a refinement and reload)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 20, 2022

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 77ce0f1:

Sandbox Source
react-instantsearch-app Configuration
routing-basic Configuration
fragrant-butterfly-rpr7b PR

@netlify
Copy link

netlify bot commented Jan 20, 2022

✔️ Deploy Preview for react-instantsearch ready!

🔨 Explore the source changes: 77ce0f1

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-instantsearch/deploys/61ea881593d1d70008f10940

😎 Browse the preview: https://deploy-preview-3268--react-instantsearch.netlify.app

@Haroenv Haroenv marked this pull request as ready for review January 21, 2022 10:17
@Haroenv Haroenv requested review from a team, dhayab and francoischalifour and removed request for a team January 21, 2022 10:38
@Haroenv Haroenv requested review from sarahdayan and francoischalifour and removed request for dhayab January 21, 2022 12:35
@Haroenv Haroenv merged commit 91cd085 into master Jan 21, 2022
@Haroenv Haroenv deleted the fix/dynamic-widget-double-fetch branch January 21, 2022 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants