It’s easy to end up with an overly complex LiveView that houses lots of business rules and responsibilities. We can use
Phoenix.LiveComponent to build a LiveView feature that is clean, maintainable and adherent to the Single Responsibility Principle.
We’ll use LiveView’s
live_link/2 together with the
handle_params/3 callback to allow users to sort a table in real-time.