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

fix(hooks): avoid effect in useStableValue #3670

Closed Haroenv closed 1 year ago

Haroenv commented 1 year ago

There's no tests for this, so make sure that the timings we had are still the same.

specifically used in: https://github.com/algolia/react-instantsearch/blob/f436d31184f3f75b33a1fdaa19c665e77948df28/packages/react-instantsearch-hooks/src/hooks/useConnector.ts#L26-L29 https://github.com/algolia/react-instantsearch/blob/aa5f9d84ddb6e97d05e6ad1baf2c6caa23891281/packages/react-instantsearch-hooks/src/lib/useIndex.ts#L22

same as https://github.com/algolia/predict/pull/45

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 9a94428ee2a2d475bffbc3147caec6203b2609a7:

Sandbox Source
react-instantsearch-app Configuration
hooks-example Configuration
netlify[bot] commented 1 year ago

Deploy Preview for react-instantsearch ready!

Name Link
Latest commit 9a94428ee2a2d475bffbc3147caec6203b2609a7
Latest deploy log https://app.netlify.com/sites/react-instantsearch/deploys/635bdee8c85869000807e0c4
Deploy Preview https://deploy-preview-3670--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.