teleport-code-generators
teleport-code-generators copied to clipboard
Handling events at the top level inside components
This refers to events we might want to handle in component lifecycle hooks, like catching a scroll event.
Might be a nice addition to the UIDL structure as well as a nice capability for describing more complex components (ex: header that changes style as the user scrolls)
This kind of event requires custom code for handling scroll correctly. It's similar to drag events, or other interactions that are different from browser to browser which usually requires some library level code that abstracts the inconsistencies away.
I'm thinking about the addition of system wide abilities, like the ability to react to the fact that an element is being scrolled into the page, or that it has started a drag operation, or that a paste event has happened somewhere inside the document.