Replies: 1 comment
-
FWIW, the With RTK's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current Docs
The current docs give the following example:
And then goes:
What might bother some here is the fact you need both
byId
andallIds
.Alternative
Now this is quite a common problem, but for some reason the first thing that popped to my mind when I saw this was eclipse's GEF framework, where there is a deep nesting requirements (so any
Figure
can have children that are also aFigure
).The way they solved it is by adding a (virtual) root element, which captures the root level ordering. Like so:
This solution may be dubious for flat structures; but for those that do involve deep nesting, the structure above provides a unified way to operate on the data (like adding or removing children).
It is thus a slightly more general solution.
Beta Was this translation helpful? Give feedback.
All reactions