How to complete the optimal solution of a react-related codesandbox without the help of the back-end

write online at any time without the need for data storage, and compile the results at any time, similar to the online editing of echarts"s demo

.

I know that there is already a library ( https://github.com/developit/htm) that can parse react in Html. But I don"t quite know how to convert the code entered in the page compilation area (actually a large input box) (a bunch of strings) into runnable react code.

ask the experienced gods to explain the optimal solution.

if your answer is, "you can try this library, which library you can refer to", don"t write it down. You can pay attention to this problem together and make progress together.

Dec.17,2021

react-prism this library

Menu