I was reading the liveview documentation and came across this:
After the client connects,
mount/3
will be invoked inside a spawned LiveView process. At this point, you can useconnected?/1
to conditionally perform stateful work, such as subscribing to pubsub topics, sending messages, etc.
But when going to the documentation of connected?
itself I read:
Once the client connects to the server, a LiveView is then spawned and mounted
statefully within a process.
If I read these correctly, mount is called when the clients connects to the server. So when can connected?
return false in the mount
callback?