Skip to content

Conversation

maartenbreddels
Copy link
Contributor

This happened when we could re-render, and there was a function component in the render tree that wouldn't need a re-execution. It would then reconciliate with the old element data (also its arguments) and the reference to the old element would map to get widget that would be used in get_widget.
However, a use_effect/use_event would have a reference to a new element and reacton would not be able to find the widget.
We now update the args and kwargs of the old element to the new elements.

@maartenbreddels
Copy link
Contributor Author

Fixes widgetti/solara#927 related to #14 #23

@maartenbreddels maartenbreddels force-pushed the fix_get_widget_could_fail branch from d145398 to ad3f352 Compare September 18, 2025 16:03
This happened when we could re-render, and there was a function
component in the render tree that wouldn't need a re-execution.
It would then reconciliate with the old element data (also its arguments)
and the reference to the old element would map to get widget that
would be used in get_widget.
However, a use_effect/use_event would have a reference to a new element
and reacton would not be able to find the widget.
We now update the args and kwargs of the old element to the new
elements.
@maartenbreddels maartenbreddels force-pushed the fix_get_widget_could_fail branch from b53fa6c to 8d962f1 Compare September 18, 2025 16:07
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