Skip to content

Redux implementation with normalized data #63

Open
@popo63301

Description

@popo63301

Hi everyone !
I'd like to solve a problem with you. How would you implement react-ui-tree with normalised data;
Like Dan Abramov advised, we can shape our store like this in the case of comments as entity:

{
  comments: {
    1: {
      id: 1,
      children: [2, 3]
    },
    2: {
      id: 2,
      children: []
    },
    3: {
      id: 3,
      children: [42]
    },
    ...
  }
}

I'd like to implement with the same store this UI Tree component.
I've seen the example of a tree view on redux repo (https://github.com/reactjs/redux/tree/master/examples/tree-view) but the only interesting implementation is deleting recursively.

How would you handle modifications and indent length for the UI tree?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions