Back to Recipe Gallery

SweetAlert2 + React Router example

SweetAlert2 renders its content outside of the ReactTree. In order to render React Router components (such as Link) you have to wrap them in the routing context which should be the same with the app.

That can be achived by using the HistoryRouter with shared history: