I created a tutorial for implementing a toggle button in LiveView.
It’s been done against Phoenix 1.7 to future-proof it, as we are moving over to a heavy component architecture in the LiveView ecosystem.
Enjoy!