I need to render an HTML (JSX) string in a React class. I don\'t know if this is possible or not. dangerouslySetInnerHTML is not valid for me because I have differe
You can use babel to transform it
npm install --save babel-core
Then in your code
var babel = require('babel-core'); var Component = eval(babel.transform('<div><MyComponent /></div>').code);
Please note that it is generally a bad idea to convert strings to executable code.