Replies: 2 comments 4 replies
-
👍 a more complex example showcasing how to effectively manage a larger data structure that includes 2+ levels of relationships would be very helpful. Particularly re best practices around computed, and how to manage relationships between several entities. A Linear-esque data model is a good example (users have many issues, issue has many comments, comment has one user, etc). It feels as though legend would be really great to model out a reactive object graph like this, but the best practices for doing so are not well captured in the docs imho. |
Beta Was this translation helpful? Give feedback.
-
Honestly, after using LegendState on a project with complex data and nested data, I really regret it, as updates comes from you don't know where exactly, the app crashes you don't know why. I am currently give it a last chance by modeling again (for the 3rd time) the state by avoiding nested data and I will see. I now quite understand the need of a unique source of truth for the state 😂 |
Beta Was this translation helpful? Give feedback.
-
Hello, do you have any example or good practice about how to use LegendState with array of objects and nested arrays ?
I'm trying to have a global list of tasks, and each task have a list of sub-tasks (and maybe others nested array). And I would like to manipulate them easily like by having functions and computed getters inside object (like with class). But by following the documentation I'm only able to have static functions which every time manipulate the root list and iterate over each nodes to access the values I want to compute...
Beta Was this translation helpful? Give feedback.
All reactions