Replies: 4 comments 22 replies
-
@jorgebucaran Said on slack:
@zaceno replied:
|
Beta Was this translation helpful? Give feedback.
-
Is there are prior art to this? |
Beta Was this translation helpful? Give feedback.
-
Is there anything I can do to move this forward? More research on how others do it? Some alternative PoC to #873? |
Beta Was this translation helpful? Give feedback.
-
Just removing the root node would suffice. No need to tear down each individual room if you are going to demolish the building. |
Beta Was this translation helpful? Give feedback.
-
Thought I would try using GitHub's new discussions feature to talk about stopping apps (we already talked about it in #873 and on slack – so why not one more place 😉 )
Last we spoke I recall you said you would bump the priority on #873 . I know that user-facing API is more important than implementation, but just to recap what the implementation entails it is just about adding:
to the bottom of the
app
function. This does two things:Notably, this does not in any way try to "clean up" the DOM, removing the app's nodes. That is intentional. You might want the DOM left intact in order to do some further manipulation with it (to animate it floating away for example), or the DOM might already have been disconnected so trying to fiddle with it would cause errors. Anyway, if you do want to clean up the DOM, that's easy enough for the user to implement themselves.
The fact that we leave the DOM alone is another reason for
dispatch = Function
(disabling dispatch). It means that all DOM event handlers, while still attached, can't actually make anything happen. The alternative would be to walk through the DOM and remove all handlers.The use case I am currently working on, where I need this and cannot find a way to solve the problem without this, is an "app gallery": a demo app where you can have one of several apps running at a time, and switch between them using a menu.
A less edge-casey scenario where this could be necessary is when you are "incrementally adopting" Hyperapp: You have a large app written with some other framework, and rather than rewriting all of it to Hyperapp in one go, you want to replace piece by piece with little hyperapps (until everything is Hyperapp and they can be merged).
Beta Was this translation helpful? Give feedback.
All reactions