Skip to content

fix: allow usage of use_reactive from outside kernel_context#952

Merged
maartenbreddels merged 1 commit intomasterfrom
fix_use_reactive_kernel_scoped
Dec 24, 2024
Merged

fix: allow usage of use_reactive from outside kernel_context#952
maartenbreddels merged 1 commit intomasterfrom
fix_use_reactive_kernel_scoped

Conversation

@maartenbreddels
Copy link
Copy Markdown
Contributor

If the reactive variable return from use_reactive is set from outside a kernel_context, the reactive variable would not be set.

This bug is demonstrated in:
https://py.cafe/maartenbreddels/solara-shared-state

Where we had to force use_trait_observe to use use_state in of use_reactive.

@maartenbreddels maartenbreddels force-pushed the fix_use_reactive_kernel_scoped branch from c402b1f to 54cb968 Compare December 24, 2024 12:40
If the reactive variable return from use_reactive is set from outside
a kernel_context, the reactive variable would not be set.

This bug is demonstrated in:
  https://py.cafe/maartenbreddels/solara-shared-state

Where we had to force use_trait_observe to use use_state in of
use_reactive.
@maartenbreddels maartenbreddels force-pushed the fix_use_reactive_kernel_scoped branch from 54cb968 to 8e579e7 Compare December 24, 2024 13:12
@maartenbreddels maartenbreddels merged commit db4435e into master Dec 24, 2024
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.

1 participant