You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For instance in HTMX they have hx-swap-oob and you can instantiate that raw HTML snippet to swap it into the DOM according to rules of hx-swap-oob.
This allows to morph the DOM in some weird ways.
It doesn't need to be completely generic but it would work even if I could take a single XML string and swap it into an element from outside.
What I try to understand if it's possible to use useRef to hold a reference to some kind of handler inside of Hyperview component where I could just submit small snippet of new XML to (not whole reload). And I'd expect this XML to run and change something in the existing app tree.
For instance I could have a fully rendered Hyperview component but then I'd want to handle a callback from the other part of React application that's not Hyperview -- then I could submit XML to some part of the app to be rendered on the spot.
If this is hard to do then my things may also be implementable by firing events. But to fire the events I'd have to fire them to somewhere and I'd still expect to then use something like useRef to take the Hyperview instance and fire the events into it (for instance if I get a push notification).
The text was updated successfully, but these errors were encountered:
Invertisment
changed the title
What would be a good way to achieve something similar to hx-swap-oob?
What would be a good way to trigger something similar to hx-swap-oob but from outside?
Dec 27, 2023
Invertisment
changed the title
What would be a good way to trigger something similar to hx-swap-oob but from outside?
What would be a good way to trigger an action but from outside?
Dec 27, 2023
Invertisment
changed the title
What would be a good way to trigger an action but from outside?
What would be a good way to trigger an action but from outside of DOM?
Dec 27, 2023
Invertisment
changed the title
What would be a good way to trigger an action but from outside of DOM?
What would be a good way to trigger a tree update but from outside of XML?
Dec 27, 2023
After looking into the way it's designed around navigation I think that the easiest way to do this is to just rerender whole page while an app would be multiple pages in size.
In other words the current design forces the user to fetch one screen at a time and it forces to rely on external routing implementation.
But then it defeats the purpose to talk about how you can represent the whole app with one XML file because now you need to have a file per screen -- just like in HTML.
Hi @Invertisment , I'm not sure I quite follow. Can you describe what you're trying to achieve in an app that you've built? We don't have an equivalent to hx-swap-oob. Typically if we want to update multiple parts of a screen, we either:
update the entire screen
use events to trigger multiple requests to update individual areas of the screen
For instance in HTMX they have hx-swap-oob and you can instantiate that raw HTML snippet to swap it into the DOM according to rules of
hx-swap-oob
.This allows to morph the DOM in some weird ways.
It doesn't need to be completely generic but it would work even if I could take a single XML string and swap it into an element from outside.
What I try to understand if it's possible to use useRef to hold a reference to some kind of handler inside of
Hyperview
component where I could just submit small snippet of new XML to (not whole reload). And I'd expect this XML to run and change something in the existing app tree.For instance I could have a fully rendered Hyperview component but then I'd want to handle a callback from the other part of React application that's not Hyperview -- then I could submit XML to some part of the app to be rendered on the spot.
If this is hard to do then my things may also be implementable by firing events. But to fire the events I'd have to fire them to somewhere and I'd still expect to then use something like
useRef
to take theHyperview
instance and fire the events into it (for instance if I get a push notification).The text was updated successfully, but these errors were encountered: