Component as popup body
arkadyb opened this issue · 4 comments
arkadyb commented
Hi,
Is it possible to render another component as html body? How?
arkadyb commented
Done. Using ReactDOMServer.renderToStaticMarkup.
khoaanh2212 commented
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.
vjustov commented
@khoaanh2212 did you ever came across a way to keep render a Component and keep the handlers working with react-sweetalert?
khoaanh2212 commented
@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.