ReactTraining / react-history

Manage session history with React
267 stars 23 forks source link

Add <Prompt beforeUnload> ? #3

Open mjackson opened 8 years ago

mjackson commented 8 years ago

We need the ability to prevent navigation in case the user decides to refresh the page. I was thinking we could do this w a <Prompt beforeUnload> prop that might be used in lieu of a message prop.

Related: Custom beforeunload messages are removed in Chrome 51. We should probably warn if someone tries to use both beforeUnload and message.