Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added useCallback to getCurrentDecision in useDecision hook #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

monahans
Copy link

@monahans monahans commented Oct 5, 2022

adding useCallback here fixed a few things:

  1. Bug: if you used multiple useDecision hooks with { autoUpdate: true }, the second one would not autoUpdate (you had to fully reload the app to get the decision to update)
  2. Before it was redefining getCurrentDecision on every rerender of the useDecision hook, which decreased performance

@mikechu-optimizely
Copy link
Contributor

This seems to relate to #196 and (now) internal ticket FSSDK-9624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants