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

How to "unmount" from the DOM? #386

Closed
trusktr opened this issue Jul 23, 2018 · 6 comments
Closed

How to "unmount" from the DOM? #386

trusktr opened this issue Jul 23, 2018 · 6 comments

Comments

@trusktr
Copy link
Contributor

trusktr commented Jul 23, 2018

Once we've rendered something, f.e.

patch(document.body, VNode)

then how to we "unmount" it? The README doesn't seem to explain that part.

@jvanbruegge
Copy link
Member

jvanbruegge commented Aug 19, 2018

you can just call patch again with an empty vnode or null

@trusktr
Copy link
Contributor Author

trusktr commented Aug 28, 2018

Thanks! This wasn't obvious. I made a PR: #392

@trusktr
Copy link
Contributor Author

trusktr commented Aug 28, 2018

Another question: besides doing

var container = document.getElementById('container');
patch(container, vnode)

what are other ways to mount into the DOM?

@mightyiam
Copy link
Contributor

Closing. See #461.

@kuraga
Copy link

kuraga commented Jan 22, 2020

Reopen as a feature request?

@mightyiam
Copy link
Contributor

@kuraga thank you. #554.

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

No branches or pull requests

4 participants