Replies: 1 comment 3 replies
-
@SemAiSoft, I would advise to flatten the state and create the tree structure via a computed. You would end up with a state type of signalStore(
withState(Array<{id: number, parentId: number}>)
); Patching should be then much easier. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Which @ngrx/* package(s) are the source of the bug?
entity, signals, store
Minimal reproduction of the bug/regression with instructions
I'm a newbie to the world of state mangmt libs, Pls direct with examples on how to PatchState of nested array of objects
For example,
Expected behavior
Please, how do I find, remove, and patch state of any the 'children' fully or partially, in a non-anti-pattern way.
Versions of NgRx, Angular, Node, affected browser(s) and operating system(s)
18
Other information
No response
I would be willing to submit a PR to fix this issue
Beta Was this translation helpful? Give feedback.
All reactions