How to run a function before back button is executed

前端 未结 0 1860
無奈伤痛
無奈伤痛 2021-02-02 09:33

I have a page in my react where a user can edit a document. But I want to be able to save that data in the event they press the back button. So far I\'ve tried this



        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题