⚡️ Quickly disconnect and reconnect your LiveView

Sometimes we want to test how our LiveView looks when it’s disconnected. We could terminate our server and see, but there’s a cooler little trick we can use.

In your JS console:

liveSocket.disconnect()

When to want to reconnect:

liveSocket.connect()

Want the latest Elixir Streams in your inbox?

    No spam. Unsubscribe any time.