There's a faster version of egghead. Click here to try it.
1×
Become a member
to unlock all features
Autoplay

    Intercept Route Changes with React Router v4 Prompt Component

    reactReact
    15 - 16

    If a user has entered some input, or the current Route is in a “dirty” state and we want to confirm that data will be lost, React Router v4 provides a Prompt component to interrupt the Route transition and ask the user a question.