React-router: Is setRouteLeaveHook() still available? Where can I find the document?

Created on 3 Aug 2017  Â·  3Comments  Â·  Source: ReactTraining/react-router

I want to add a confirm dialog when users switch to other routes without saving changes. I found some Stack Overflow posts of setRouteLeaveHook() function. But I cannot find it in official document. Is it still supported? Where could I find an official document or tutorial? Thanks!

All 3 comments

but it warns 'A history supports only one prompt at a time'? why and how?
maybe the reason is i use the 'rc-queue-anim', but i am not sure and even do not know how does it cause the problem
@timdorr

https://github.com/ReactTraining/react-router/blob/v3/docs/guides/ConfirmingNavigation.md

Not a detailed documentation but still an official documentation with brief example.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stnwk picture stnwk  Â·  3Comments

yormi picture yormi  Â·  3Comments

ArthurRougier picture ArthurRougier  Â·  3Comments

ryansobol picture ryansobol  Â·  3Comments

hgezim picture hgezim  Â·  3Comments