Manipulating URLs in is a nightmare. The official Url package comes with one of those wonderfully type-safe APIs that covers only a few use cases. There's no way to modify a query parameter in an existing URL, for example.

The Erl library looks more promising, let's give that a try.

@ayo elm is fine for ui, and maybe simple state transformation
For side effects and integrations with other stuff you're pretty much forced to make a js call from it

@glaurungo Absolutely correct. I have a fair amount of Elm components that interact with the rest of the page through ports and ugly hacks.

I just hoped I could do a Browser.Navigation.load call with a slight modification to a URL given through a flag, but Elm can be troublesome even for that. The Erl package did do the trick though.

Sign in to participate in the conversation

Welcome to your niu world ! We are a cute and loving international community O(≧▽≦)O !