-
Notifications
You must be signed in to change notification settings - Fork 780
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
Add support to destroy app instance bound to DOM. #789
Comments
@wanton7 Do you think this relates to jorgebucaran/superfine#136? |
@jorgebucaran yes that's exactly what I need! Component might have registered itself to some external service or maybe it's wrapping some jQuery/JavaScript component so having hyperapp call those remove/destroy lifecycle events is what I need. I also need the call to be synchronous, so after it returns everything has been destroyed/unmounted. |
@jorgebucaran By synchronous I mean that hyperapp itself won't do any unnecessary |
I've been thinking about this and it would better to add new life cycle event maybe called |
@jorgebucaran |
Hey @wanton7. I think what you want is what's described in jorgebucaran/superfine#136 and not lifecycle events at all. It's my fault for bringing them up. I talked about lifecycle events because your #789 (comment) reminded me of them. Also for the record:
|
Tracking in #863. |
We are trying to embed hyperapp into our company's old jQuery based application and I've hit a wall. I tested different kind of rendering libraries that don't need pipeline like Webpack and just using
<script>
is enough. What's missing is way todestroy
hyperappapp
instance. Ex. Vue.js hasvm.$destroy()
.We sometimes destroy existing HTML, like using Ajax to load HTML from server and replacing old HTML with jQuery. We also also use jQuery UI's
remove
event to clean up everything properly when old HTML is replaced and it had components made with jQuery. We like to replace these components progressively using hyperapp but could not find anything likevm.$destroy()
in Vue.js orReactDOM.unmountComponentAtNode()
in React to destroy hyperappapp
instances properly.The text was updated successfully, but these errors were encountered: