-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can you pass react components in html prop? #194
Comments
Here's the official example of how to use SweetAlert2 + React Router: https://sweetalert2.github.io/recipe-gallery/sweetalert2-react-router.html My guess is that you're using React Router. If so you need to wrap what you're passing to MySwal.fire({
html: (
<BrowserRouter>
...
</BrowserRouter>
),
}) |
^^ This advice is "wrong", in the sense that if you do this you are creating a second routing context, which won't work the way you want. It will render the |
Here's the official example of how to use SweetAlert2 + React Router: https://sweetalert2.github.io/recipe-gallery/sweetalert2-react-router.html |
using Link component here breaks my alert and it shows nothing except the title.
does Sweetalert2-react-content support react components as html content?
The text was updated successfully, but these errors were encountered: