I built a React code editor component that also compiles, executes and returns the outputs of the program written in it (via pyodide/webassembly). I believe that this is a useful package for those building projects with web-based code editors. Expanding the library to be more flexible + have greater language support is a goal for the future.
Hope it helps someone out there - please feel free to reach out if I can assist. Feedback and suggestions are always welcome.