Instantly share code, notes, and snippets.

Embed
What would you like to do?
import ReactDOM from 'react-dom';
const componentToString = function(node) {
let el = document.createElement('div');
ReactDOM.render(node, el);
return el.innerHTML;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment