
Show HN: Generates relations between DOM elements depending on their depth - jimmy2020
https://github.com/jalal246/dflex/tree/master/packages/dom-gen
======
spiralx
I'm impressed. I've looked through the README, the code, the tests and your
comments here, yet I have no idea what this is supposed to do, how it relates
to the DOM, how you would use it or why you would use it.

------
kburman
What is the usecase for this?

~~~
jimmy2020
This is the fastest way you can traverse in DOM tree especially if you have an
app that heavily depends on manipulating dom nodes. Let's say for animation,
you targeted the clicked element with transition and apply internally some
logic to the dom tree elements before they got effected with this transition.
In this case, stored relations really shines.

Think of it when the user doesn't click once or twice, but actually hundreds
of times. That wouldn't be a problem if you know what DOM is look like. And
that's not applied to a known app you design. This is an algorithm, that
simply designed to deal with any tree even frameworks that generate DOM
Asynciously From parents to children and vice-versa.

~~~
kburman
Any benchmark to prove it's effectiveness or demo page to test it out?

~~~
jimmy2020
What makes you skeptical about this approach?

Ideally, it should be a proven benchmark. But keep in mind that it is an early
release with something completely new.

