Skip to content

How to handle two-way data binding with fragment masking/colocation #179

Answered by kitten
KammererTob asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure if I'm 100% following, but trainerModel.person = person seems like a bit of an icky idea to me. That said, I think there's no specific problem here, except that you have, conceptually speaking, a circular fragment dependency.

Meaning, suppose we're trying to fill in person: ???.

The problem is that the sub-component currently uses just PersonSelectFragment to select data.
But the parent component defines name, i.e. its own selection set.

Conceptually speaking, you want to enforce that person: ??? is typed in such a way that reconciles both. This should cause you trouble, basically, because you're trying to reassign trainerModel.person.

So, in my opinion, this is a good limita…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@KammererTob
Comment options

Answer selected by kitten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants