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

Use rememberUpdatedState to prevent stale lambda capture #24

Closed
wants to merge 1 commit into from

Conversation

halilozercan
Copy link

If a composable passes a lambda argument down to other composables via wrapping, lambda gets captured which may not read the latest state when executed. rememberUpdatedState fixes this problem.

If a composable passes a lambda argument down to other composables via wrapping, lambda gets captured which may not read the latest state when executed. `rememberUpdatedState` fixes this problem.
@ffgiraldez
Copy link
Collaborator

Hi, @halilozercan thanks for this fix. Could you please also add it to the HarmonyColorPicker composable, to keep both in sync

@riggaroo
Copy link
Collaborator

@halilozercan thanks for spotting this - i've made a change in #30 for both pickers

@riggaroo riggaroo closed this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants