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

feat(core): support react 18 strict mode #3653

Merged
merged 2 commits into from
Oct 13, 2022
Merged

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Oct 13, 2022

Summary

This PR makes React InstantSearch compatible with React 18's Strict Mode.

Result

Similar to what we did for React InstantSearch Hooks, cleanup logic is now scheduled instead of immediately executed on unmount, which makes them cancelable when React 18's Strict Mode remounts the components immediately.

Sandbox →

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 13, 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 d84762e:

Sandbox Source
react-instantsearch-app Configuration
react-instantsearch-app (forked) PR

@netlify
Copy link

netlify bot commented Oct 13, 2022

Deploy Preview for react-instantsearch ready!

Name Link
🔨 Latest commit d84762e
🔍 Latest deploy log https://app.netlify.com/sites/react-instantsearch/deploys/6347dd7fc657b500092463e7
😎 Deploy Preview https://deploy-preview-3653--react-instantsearch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@dhayab dhayab requested review from a team, FabienMotte and Haroenv and removed request for a team October 13, 2022 09:44
Copy link
Contributor

@FabienMotte FabienMotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@dhayab dhayab merged commit 9174806 into master Oct 13, 2022
@dhayab dhayab deleted the feat/ris-react-18-strict-mode branch October 13, 2022 11:47
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.

3 participants