Creating a React Native project can involve installing dependencies, compiling, and waiting for it to run on a device, sometimes for up to 15 minutes. Snack aims to make that quicker: users open a link, edit an app in the browser, and preview it on a device. Its editor also offers components that users can drag into their code.
Building of Snack The React Native Playground
Speaker
Satyajit Sahoo, a React Native code contributor, explains how Expo Snack was built at a Callstack talk.
An earlier project, AirPlay, sent a server-built bundle to a remote simulator, which Sahoo found slow. Snack instead sends code from the editor to a React Native app running inside Expo, where it is evaluated after each change. Babel Standalone transpiles modern JavaScript first, and a custom module map supports imports and exports.
Snack wraps component methods in try-catch blocks to display some JavaScript errors without crashing the app, though native-side errors and some module failures remain difficult to catch. For npm libraries, Snackager uses Webpack and code reused from Haul to build packages without duplicating React, React Native, or runtime polyfills. It caches bundles in S3 and pins package versions so a Snack keeps using the same version.
The editor integrates ESLint and Prettier and includes searchable components that can insert required code through AST manipulation. Sahoo describes uses including teaching, prototyping, documentation embeds, and bug reports that others can try from a link. Repl.it used the Snack SDK, while Native Directory linked library examples to Snacks for hands-on previews.
At the time of the talk, the team was working on multi-file support and user accounts for saving projects. Sahoo describes the work as a way to contribute something useful to the community.
Takeaways
- Reduce onboarding friction by letting users try a product from a link before installing a local toolchain.
- For fast previews, send code changes to a running app and evaluate them instead of rebuilding and streaming a full bundle.
- A custom package pipeline can exclude dependencies already present in the runtime and cache built packages.
- Pin dependency versions in shared examples so they remain reproducible over time.
- Embeddable, editable examples can make documentation and bug reports easier for others to explore.
Mentioned in this talk
Search inside this talk
What was claimed 9
- role atSatyajit Sahoo is code contributor at React Native
“I’m a code contributor to React Native.”
YouTube Unverified1 source· Talk
- featureSnack: Create React Native apps in a browser and try them on a device without local setup
“you can create a React Native app in the browser and try it on your device without any setup”
YouTube Unverified1 source· Talk
- usesSnack uses Expo Snack runtime
“the Snack runtime, which is a React Native app running inside Expo”
YouTube Unverified1 source· Talk
- uses
“There's something called Babel Standalone ... We just use it.”
YouTube Unverified1 source· Talk
- uses
“It uses Webpack behind the scenes.”
YouTube Unverified1 source· Talk
- uses
“So we wrote our own. It’s called Snackager.”
YouTube Unverified1 source· Talk
- featureSnackager: Bundles npm packages while excluding React and React Native
“creates a bundle with all its dependencies, but excludes React Native and React”
YouTube Unverified1 source· Talk
- uses
“They have this editor based on the Snack SDK.”
YouTube Unverified1 source· Talk
- integrates withNative Directory integrates with Snack
“They have their Snack links”
YouTube Unverified1 source· Talk






