-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What's a good way to deal with deeply nested cursors? #17
Comments
This is an interesting use case. I am think of a possibility to do something like this through props or context but need to think this a little bit more because cases when this would not be as simple. What you can do in the meantime is to pass the base of the path as a prop, for instance. On a side note, you seem to be using |
@Yomguithereal Cool. I'll go with props. |
@Yomguithereal I've been thinking this a bit more. It seems to me that in my case the smartest move would be to flatten the structure (notes and lanes and root level) and provide facets. Related: Yomguithereal/baobab#225. |
I was thinking about this lately but I guess I'll see how cerebral fix the problem. |
@Yomguithereal Yeah, apparently monkeys solve this neatly. There's a WIP demo. |
Cool. Will check this out asap. |
I have a tree like this:
It is possible the tree will grow further as I add new concepts to the system (maybe boards etc.).
So far the decorator syntax has worked just fine. I feel it gets a little cumbersome on the lower levels of the hierarchy, though. To point at notes I would have to do something like this:
Maybe the cursor of previous level could be passed instead of root to the child instead? Then I could do:
If I could do this, I wouldn't have to care about the whole hierarchy, just the immediate parent.
How would you deal with deep nesting like this?
The text was updated successfully, but these errors were encountered: