Closed bcardarella closed 3 months ago
I think the flicker you're seeing is related to AsyncImage
reloading after the document is parsed. In any case, we should remove the default animation from AsyncImage
, or at least make it configurable.
AsyncImage was updated in #1351
Closed with #1351
https://github.com/liveview-native/liveview-client-swiftui/assets/18524/7515af96-9380-43bc-96a5-8f0e8624c39b
I have a simple app with just a few routes:
and a simple template:
the LiveViews themselves and the target templates are effectively empty. When I navigate to another route then Back Button to the Home the re-render happens. I can see in the server log that a new Mount happens too:
What I suspect is happening is the cached page is showing and the sever then sends the page over the wire and this re-hydrates the View. In my case I have some animations that haven't been removed yet so I see the page jump.
Comparing this to the HTML LiveView the log looks slightly different:
If you follow each
MOUNT
you will see that for the first set from the SwiftUI client on the lastMOUNT
back toHomeLive
it includesParameters: %{"_format" => "swiftui}
but this is not present for the HTML. I suspect we're doing a full reconnect and not staying within the socket lifecycle?