Open den1k opened 7 years ago
When opening issues it's preferred that we just focus on describing the perceived problem. We should defer from proposing any solutions as it's just more stuff to wade through on the way to actually understanding the problem. So far I do not understand the problem at all. So let's work on that first.
My guess is that you have two components with different queries on the same logical entity and these are not getting merged correctly since there's no notion of precedence?
@swannodette I agree these two should be separate initially. It would be beneficial, however, to have a place to share and discuss ideas, even if they're throwaways. (Wiped my proposed ideas)
Yes, your guess is spot on.
I fail to see what the problem here is. The concept of identity in Om Next is specified by the Ident
protocol. If your Ident
implementations are different, Om Next will never know that they refer to the same logical entity.
Also discovered another use-case I find dangerous. It's possible to end up with duplicate state by normalizing with two different components, see here:
The problem is a) that Om does not know that the same state is normalized twice and b) that even if it knew that both idents normalize the same entity, it would still not know which one to prefer, i.e. which should point at the other. In this case
type/foo
looks like the more transient one, that can easily be replace by passing different props. If the state ends up there it will be overwritten.