algolia / react-instantsearch

⚡️ Lightning-fast search for React and React Native applications, by Algolia.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/
MIT License
1.97k stars 386 forks source link

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

Closed dhayab closed 1 year ago

dhayab commented 1 year ago

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[bot] commented 1 year ago

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

Sandbox Source
react-instantsearch-app Configuration
react-instantsearch-app (forked) PR
netlify[bot] commented 1 year ago

Deploy Preview for react-instantsearch ready!

Name Link
Latest commit d84762e9561f600cc576daad741d278ac95bae4f
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.