The React sandbox environment on ChatGPT Canvas seems to be already working (but not available to users yet) 🚧 It takes a bit of time to load but after that, you can switch between code and demo views seamlessly.
OpenAI keeps working on the code execution sandbox feature for ChatGPT Canvas. It seems like it will support Python, Javascript and Typescript at the beginning. It is still WIP and not available yet 👀