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

fix(hooks): avoid effect in useStableValue #3670

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Oct 28, 2022

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

specifically used in:

const stableProps = useStableValue(props);
const stableAdditionalWidgetProperties = useStableValue(
additionalWidgetProperties
);
const stableProps = useStableValue(props);

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

@Haroenv Haroenv requested review from francoischalifour, a team, FabienMotte and sarahdayan and removed request for a team October 28, 2022 13:53
@codesandbox-ci
Copy link

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

Sandbox Source
react-instantsearch-app Configuration
hooks-example Configuration

@netlify
Copy link

netlify bot commented Oct 28, 2022

Deploy Preview for react-instantsearch ready!

Name Link
🔨 Latest commit 9a94428
🔍 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.

Copy link
Member

@francoischalifour francoischalifour left a comment

Choose a reason for hiding this comment

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

This will likely boost performance by saving ticks on every prop change.

@Haroenv Haroenv merged commit d1f53ae into master Nov 2, 2022
@Haroenv Haroenv deleted the fix/stable-without-effect branch November 2, 2022 08:25
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

4 participants