Using macros for consistent authorization Are one of these LiveView anti patterns lurking in your codebase?

Animating LiveView Deletions with JS.hide/2 & JS.push/2

Someone asked me how to animate deleting elements in LiveView. The trick is to use LiveView.JS:

  • JS.hide/2 with animate option to hide and animate, and
  • JS.push/2 to send the event to the server
  • ✨ beautiful deletions ✨