Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Redux implementation with normalized data #63

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?

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

No branches or pull requests

1 participant