2 ms·
Sadly React disallows this pattern even though this interface is in the DOM spec
by imbnwa 3y ago
Sadly React disallows this pattern even though this interface is in the DOM spec
- masswerk 3y agoIn the context of coroutines, the nice thing about this is that – as a catch-all trap – it works much like an interrupt that is internal to that specific object. (Of course, only when the GUI thread allows for event processing.) On the one hand, this is pretty much the essence of what events should be about: invoking a dormant object (or context) by the means of a message. On the other hand, this inherent locality may pose a problem for any framework. (And – in the age of AI generated images – on the third hand, this is why I personally don't like frameworks that much.)
- kamikaz1k 3y agoIt doesn’t disallow it, it’s just outside of how the framework operates. If you really want to make the two talk, you could, with the cost of having to maintain it.