react-ui-tree icon indicating copy to clipboard operation
react-ui-tree copied to clipboard

Redux implementation with normalized data

Open popo63301 opened this issue 8 years ago • 0 comments

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?

popo63301 avatar Nov 25 '17 10:11 popo63301