Skip to content

Redux implementation with normalized data #63

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
popo63301 opened this issue Nov 25, 2017 · 0 comments
Open

Redux implementation with normalized data #63

popo63301 opened this issue Nov 25, 2017 · 0 comments

Comments

@popo63301
Copy link

popo63301 commented Nov 25, 2017

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?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant