Skip to content

Conversation

@nielsenko
Copy link

@nielsenko nielsenko commented Feb 10, 2026

  • Replaced the unconditional rebuild() with updateChild(). This allows the framework to synchronize the child element rather than marking the entire branch as dirty.
  • Added identical(component, newComponent) checks in update on StatelessElement and StatefulElement. If the component instance has not changed, the update now short-circuits immediately, preventing unnecessary build passes.
  • Added a test to illustrate the problem is fixed.

This fixes #43

- Add early return in State(less/full)Element.update when component is identical.
- Fix InheritedElement.update to use updateChild instead of rebuild.
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.

Unexpected behaviour for InheritedElement.update

1 participant