Preserve params when push_patch from handle_event

I still can’t wrap my head around how to update the existing URL query.

  1. LiveView.handle_event accepts all the same params as LiveComponent.handle_event
  2. LiveView.handle_info (which I can trigger with send from LiveComponent) also doesn’t know anything about the current URL query.

The best I have in mind is to pass the query params in assigns of all components but then, I suppose, it will re-render the whole page, and then what’s even the point of having LiveView. And also it’s messy and easy to get out of sync. I’m wondering why the current URL isn’t in the socket in the first place.

UPD: what I mean is that I see many ways how to update the LiveView state for different kinds of events but I can’t see a clean way to keep the URL query in sync with these changes.