Use react-router's Prompt for confirmation message
Now that PubSweet apps are using react-router
v4 and history
v4, the history.listenBefore
method is no longer available.
Instead, use react-router's Prompt
component to conditionally show a message when leaving the editor.