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

vnode.state in attribute lifecycle methods should be documented #24

Open
dead-claudia opened this issue Jan 10, 2018 · 1 comment
Open

Comments

@dead-claudia
Copy link
Member

dead-claudia commented Jan 10, 2018

In components, it's already documented to be equal to the component instance. In attributes, it's not even documented to start. In the source, it's already well-tested in the case of DOM vnodes, but not component vnodes or fragments AFAIK. The current behavior is this:

  • DOM vnodes: vnode.state = {}
  • Fragments: vnode.state = {}
  • Components: vnode.state = componentState (same as what's in components)
@barneycarroll
Copy link
Member

Might be worth showing how eg fragments can be used to do simple 3rd party / DOM effects setup / teardown without requiring component declaration.

@dead-claudia dead-claudia transferred this issue from MithrilJS/mithril.js Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Low priority
Development

No branches or pull requests

2 participants