Reitit.frontend navigate back

I’m using Reagent with reitit.frontend as the router. I have forms that need to go to the previous page when a button is clicked. I haven’t been able to find an example of how to do that. In Vue, it’s done like


How is that done with reitit?

Haven’t used reitit.frontend but can’t you just call (.back js/window.history)?

Indeed, just calling window history methods should work. My understanding is that Vue also does just this:

(.go js/window.history -1)
;; or
(.back js/window.history)

For now, I don’t see reason to add functions for this to Reitit, but we should mention this in the docs. (Added:


OK, cool That’s what I did to get it working. I thought I had read at some point that Vue and React didn’t want you to navigate outside of their routers because of internal state or something. Maybe I’m not remembering that entirely correctly, or it doesn’t matter here.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.