Clojurescript reitit intercept back-button

In our re-frame app (which uses reitit-frontend), on some pages we need the functionality you’ve all seen before: “Confirm Changes?” before the operation of leaving the page works, whether by link or by back button, etc. The example from reitit site actually performs a “back” operation if they decline; this gets them back onto the same page, but it screws up the history stack and feels very hackish.

Have any of you implemented the “Confirm changes?” functionality to intercept back-button press in your SPAs?

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