Master fix ged#1877
Merged
Merged
Conversation
In Owl 2, reactivity was tracked per-component-instance: when state read by a descendant or by slot content was mutated, the parent that owned the state re-rendered as a whole and its `patched` hook fired. In Owl 3, signal reads subscribe whichever component is currently rendering, so a parent that merely holds a signal is no longer re-rendered just because a child or slot reads it — and its `onPatched` no longer fires. The hooks still work as documented (they fire when the component's own bdom is patched), but the surrounding behavior changed enough that code ported from Owl 2 can silently stop reacting. Documents the new scope and points readers at `effect` for value-driven side effects. - reference/component.md: scope subsection on `patched`, with the slot+signal example, plus a "what `patched` is for vs. when to reach for `effect`" subsection. `willPatch` cross-references the same rules. - migration_owl2_to_owl3.md: new entry #22 with the same example, an explanation of why Owl 2 behaved differently, and an `onPatched` → `effect` migration recipe.
When a child component has defaultProps and any willUpdateProps hook, the update path applied defaults onto the incoming props object and assigned that augmented object to node.props. On the next parent render, arePropsDifferent walked the stored props and found ghost diffs on the default keys (the new fresh props don't carry them), re-rendering the child every time. Only paths that iterate every key trip the bug: t-props (dynamic prop list) and slots-prop. The static propList path was unaffected, since it only compares listed keys. Pass effective (defaults-applied) props to the hooks but keep node.props raw — defaults are already resolved lazily by the prop()/props() getters reading node.props, matching what the initial render does.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.