I'm using a plugin (react-simple-code-editor) thar allow me to edit a complete JS file from the imports untils the end of a component declaration.
This editor returns a string with all the file declaration. In this example, it would be:
import React from "react"; import ReactDOM from "react-dom"; function App() { return ( <h1>Hello world</h1> ); } export default App;
Is there a way to use this string, as code. I Mean, render it, or read it like if it is a normal file ?
I've tried react-jsx-parser, but it only works with strings that are the component, not complete JS files.
