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

Infinately nested relationships #31

Closed
johnkorzhuk opened this issue Jun 12, 2019 · 1 comment
Closed

Infinately nested relationships #31

johnkorzhuk opened this issue Jun 12, 2019 · 1 comment

Comments

@johnkorzhuk
Copy link

Not sure if this is an issue or not. An example of what I'm talking about: https://d.pr/v/NEVuzG

The problem here is a shipment has a relationship to loadData and loadData has a relationship to the same shipment causing the output of...

dataFormatter.denormalizeReduxObject({
      reduxObject: state.data,
      entityType: "shipment"
})

...to be what's shown in the link. Is this a concern?

denormalizeReduxObject isn't getting stuck in an infinite loop traversing and building the relationships, so what's going on here? Is it just referencing the same object? Also what implications does this have with react's virtual dom reconciliation? redux-object's build method uses getters for scenarios like this, but it doesn't do as good of a job of building those relationships.

@olosegres
Copy link
Owner

@johnkorzhuk
Hi!
Yes, it's referencing the same object and this is ok, you can get details here #3 (comment)

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

2 participants