Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Calling the updated hook when phx-update="ignore" #388
When using NPM's
From the article:
Also, I think the root of the problem is the diffing. You are updating client code; however, the server only knows about
This is a very interesting problem though. How can one apply client side only updates in
@snewcomer I don't think I have enough insight into LiveView's design to say if I'd expect this to be correct by design. I guess it depends on what you perceive as being "updated" when
@joxford531's solution sounds good to me as well. So the final markup would look something like this?
It's interesting to know that
Now that there's another way of implementing this, I guess I'm just curious if the original behavior was considered a bug, and if the current behavior is considered correct?
And while I was writing out a more in-depth update, I managed to convince myself that the original behavior really doesn't make sense. The "updated" in the
Thanks for being my rubber ducky, everyone!
That said, I'd still be interested in knowing if we can rely on this behavior in the future:
The next release will merge attributes on
ignored containers are always respected, provided they are not removed from their parent, or their parent is removed, etc. The parent/ancestors updating is not an issue because we only ignore the container once we get to that part of the tree while we morph. Stay tuned. Thanks!