Fork me on GitHub

I'm doing a bit of re-frame specific URL routing (think Secretary style but routes are based on re-frame events) and I'm thinking about making it into an effect library - if anyone is interested I'll put some of the details and questions in a thread (the most important being whether my name is too obscure and hopefully some bike shedding around that).


The main ideas is to make the URL routes just fall out of your effects - when you have an effect that should have a distinct route, you add an interceptor or an effect and it will properly update the URL.


If you manually browse to a URL (such as your first page visit being to a deep link) it should dispatch the matching event (knowing only what the route can tell you). If you browse using forward, back, or manual entry when the site is already loaded it will dispatch those events as well.


I haven't found anything quite like this, and I haven't been happy trying to integrate any other routing libraries in the past - it made me feel like my event handlers were 2nd class citizens and I had issues getting manual entry and such working nicely. I also didn't want to have to manually set my routes outside of my event handlers. If you think there's a good solution please let me know!


On to the most important question - how obscure can my pun be before people will actively avoid my library? My current frontrunner is sash-fillister - it's a type of wooden plane that is used when making wooden window frames using traditional methods, and the most likely replacement for it in a modern shop would be some kind of router. For an informative post on how to use them and to get the totally unnecessary context, see


I'm planning to make sure it works well before releasing it into the wild, so don't steal my awesome name - but if anyone is interested I can whip up a quick gist or something that you could use to implement what I've got so far. Alternatively, if you think it's a totally dumb idea I'd love to hear why - most of the time there's a really good reason why the libraries I think would be fun don't exist 🙂


And if you want to get your fill of jargon that has nothing to do with programming, check out the description of them for sale at


I’m curious how this pans out for sure. Haven’t thought of routing as a problem in re-frame, but it could be improved


Can someone point me in the right direction? I’m attempting to use bidi for routing and I’d like to switch panels when a link is clicked. On line 17 in celestial.cljs should I change my line to url-for to :universe nothing happens. At one brief point I did see an event triggered in the console but I’m running in circles at the moment.


@decim not sure if this is it but this reg-sub looks at the :panel key


but the property you're setting is :active-panel


@danieleneal hmm, thanks. That’s certainly one gaff. I updated that but still not getting the result I want. I feel I’m missing calling the subscription all together to cause an action but at the moment i’m lost as far as where I am.


is dispatch-route getting called?


The other thing I noticed (I've not used pushy so guessing here) is that your call to pushy/start! might not be happening


this is in a function but it doesn't look like this function is getting called


it looks like pushy/start! is a side effecting step that sets up the route handling thing, so will need to be called from wherever you do your initialization and mount the app


@danieleneal you may be correct there. I haven’t added pushy to core.cljs. That makes sense… Or rather I just threw it in routes.cljs. It really should take place in core.cljs


@danieleneal sweet, getting there. It didn’t flip to the correct panel yet BUT it did update the db. I should be able to work it out from there. Thanks man.


@danieleneal thumbs up works 100% now!


ok odd, it worked once then stopped with no code changing. possibly a caching issue


where are you calling pushy/start from now?


in core.cljs init!


(defn ^:export init! [] (rf/dispatch-sync [:initialize-db]) (load-interceptors!) (mount-components) (pushy/start! (pushy/pushy routes/dispatch-route routes/parse-url)))


i’d wondered if it should be before mount-components…


@decim yes, I'd put it before mount-components


@decim in my case, it's even before (rf/dispatch-sync [:initialize-db])


hmm @manuel makes sense. I’m getting there…theres so much going on 😰


@decim if you want a working example, I have this on my GitHub:


so odd…so i moved it..reevaluated and it updated the panel. though now the links still aren’t working. getting closer though. @manuel ahh! thank you! i’ve been looking all over for a bidi/re-frame example!


this should get me in order


hi. I Have TextInput element which update ok when typed, bet when text is changed vie subscribe it wraps text, bet number of lines stais the same. how to force it to recalculate it's "(.-height)"


meaning textarea? set scroll to true


That depends, do you want your area of text input (note that I didn’t say TextInput nor TextArea!) to grow vertically along with the growing number of lines?


I bet it’s much more of a hassle than to use a scrollable textarea, btw. Googled it a little bit, think the following could be converted to reagent with some love:


thank you a lot guys! 🙂


It is subscribed to the data field and draws it via ':default-value (or @input-text "")'


debugging for 5 days 😞