Maybe the way I use CodeSandbox is different to most people. Generally, I just want to create a quick, sharable draft of something in as little time as possible.
Often I’ll need to sketch out something involving React and/or TypeScript, and other external libraries, so the Console in Chrome DevTools won’t really cut it.
Maybe I need to test out some complex CSS in isolation. Maybe I need to link someone a quick demo for some algo or React component. Or maybe I just forgot it’s Day 1 of Advent of Code and I need to get a head start.
Tools like CodeSandbox and StackBlitz seem to be veering away from this use case - they want to be a home for full projects, rather than just a sharable scratchpad. Maybe they could be both, but the length of time these tools take to boot up and requiring everything to be tied to an account indicates otherwise.
I just want to get in, quickly sketch something, and get out. That’s why I scrapped tsx.zone together.
It:
Is it secure? Well, I probably can’t guarantee that. At the very least, any code you bring in (including libraries) is going to be sandboxed to an iframe in a single browser tab. But yes, we’re unironically using eval in production, if that matters.
Anyway, feel free to give it a try. Lemme know if anything breaks or is just plain bad.
Special thanks to: