Fork me on GitHub

Hi! Am I in the right place if I want to ask something about bidi?


Hi - ask away! I saw some chatter on #C03S1L9DN earlier today, if you can explain what you're trying to achieve I'd love to help


or you can always raise an issue on gh, or email me direct at <mailto:[email protected]|[email protected]>


now that bidi has made the jump to cljc (rather than cljx) it's a lot easier to hack on it, so I'm planning to make some improvements to the cljs side


I solved my problem using tag, but the routes are not pretty 😉


Basically, I wanted to the routes /[#"[^]*" :state]/requirements and /[#"^]*" :state]/requirements/[#".*" :names] to map to the same handler but with different parameters. I had that working. But I also wanted to use bidi.router/set-location! to generate URLs from locations and have it automatically decide which of the two URLs above to generate depending on whether :names is present in the :route-params passed to set-location!.


I've solved it by using tags for the two match handlers and passing a location to set-location! with :handler set to the corresponding tag (e.g. :expanded-requirements for the form with :names), so now it generates the right URL. Is this possible without tags or with simpler rules?