I am contributing to a project where I observe a pattern such that sometimes inside a LiveView
mount/3 we check for
if connected?(socket) and only when
true do we do an expensive database fetch and put the list in the assigns.
Wouldn’t LiveView need those renders to align for the change tracking to work properly?
Or am I to understand it such that once the websocket connection happens, LiveView dumps the entirety of the previous render and replaces it with the outcome of the second “connected render” and uses that as the starting point of change tracking?
Thanks for your help.