chentsulin/sweetalert-react

Component as popup body

arkadyb opened this issue · 4 comments

Hi,

Is it possible to render another component as html body? How?

Done. Using ReactDOMServer.renderToStaticMarkup.

renderToStaticMarkup just render static html,if your component has complicate handler, none of them can work.
example you have an component with some onClick function,when you use renderToStaticMarkup,it doesn't work.

@khoaanh2212 did you ever came across a way to keep render a Component and keep the handlers working with react-sweetalert?

@vjustov i need to put an props.children into sweetalert,and the only way until now is build a new Components SweetAlert.this project didn't render anything,just use sweetalert.js to run popup.