t4t5 / sweetalert

A beautiful replacement for JavaScript's "alert"
https://sweetalert.js.org
MIT License
22.4k stars 2.84k forks source link

Objects are not valid as a react child(found:[object Promise]). If you meant to render a collection of children, use an array instead #960

Closed zainsheikh98 closed 3 years ago

zainsheikh98 commented 3 years ago

While calling swal inside my component it displays an error as mentioned in the title...

Please tell me how to fix it

jayna456 commented 3 years ago

Probably you have to use "@sweetalert/with-react"