What is Expo Snack, and when would you use it instead of a local Expo project?
answer
- nothing to install
- Android, iOS or web preview
- shareable link, reproductions
- same module limits as Expo Go
- no custom native code
basics
~20 sExpo Snack is an in-browser environment for writing and running Expo code with nothing installed, previewing on Android, iOS or web. It suits prototypes, shared snippets and bug reproductions, not apps that need custom native code.
solid answer
~50 sSnack, at snack.expo.dev, is an in-browser development environment that works like Expo Go: you edit files such as `App.js` in the browser, add npm dependencies, and see the result live for Android, iOS or web from the side panel. Because nothing needs installing, it is ideal for trying an idea, sharing a runnable snippet with a colleague, answering a question, or attaching a minimal reproduction to a bug report. Its limits come from the same model as Expo Go: it runs a fixed set of native modules, so libraries with custom native code, config plugins and anything needing a development build are out of reach, and some SDK modules are documented as unsupported in Expo Go and Snack. Once a prototype needs native changes, a build or a real project structure, you move it into a project created with `create-expo-app`.
go deeper
Know that Snack runs Expo code in the browser with nothing installed and previews Android, iOS and web.
Explain that Snack shares Expo Go's fixed native runtime, so custom native modules and config plugins are out of reach.
Use Snacks for minimal reproductions and quick spikes, and know when a prototype must move into a real project with a development build.
Encourage runnable reproductions and shared prototypes as a team habit; they shorten bug triage and design discussions.
## What Snack is **Snack** is Expo's in-browser development environment at snack.expo.dev. You write React Native code in a browser editor, add dependencies, and run the app live without installing Node, Xcode, Android Studio or anything else on your computer. The Expo docs describe it as working similarly to **Expo Go**, the prebuilt app that runs Expo projects with a fixed set of native modules. A typical session: 1. Open snack.expo.dev; a starter `App.js` is already there. 2. Edit a component, for example the `<Text>` on the first screen. 3. Pick a platform, Android, iOS or web, in the right-hand panel and watch the change live. 4. Save and share the link so someone else can open, run and fork it. Expo Orbit, Expo's desktop companion app, can also launch Snack projects on Android emulators and iOS simulators. ## Where Snack shines - **Prototyping.** Sketching a quiz app's question card, with a timer and answer buttons, is faster in a Snack than in a fresh project: no scaffolding, instant preview. - **Sharing runnable code.** A link beats a pasted snippet because the reader can run it. - **Bug reproductions.** A minimal Snack isolates a problem from your app's other code and gives maintainers something they can execute. - **Interviews and teaching.** Everyone gets the same environment in seconds. ## Where it stops Snack's runtime is fixed in the same way Expo Go's is, so the limits follow directly: - **No custom native code.** A library that ships its own native module which the runtime does not include cannot run. - **No config plugins or prebuild.** There is no native project to modify, so anything configured through the app config's native side is unavailable. - **Some SDK modules excluded.** The Expo docs mark certain modules, `expo-calendar` for example, as unsupported in Expo Go and Snack, directing you to a development build. - **Not a project home.** No real repository layout, CI, builds or release pipeline. ## Keeping a Snack useful - **Keep it minimal.** A reproduction with one screen and the smallest set of dependencies is the one maintainers actually read. - **Name the SDK.** State which Expo SDK the Snack uses when reporting a bug; behaviour differs across SDK releases. - **Test each platform.** Switch the preview between Android, iOS and web; a layout or API can behave differently on each. - **Do not store secrets.** A shared Snack is code other people read and fork, so keys pasted into it are effectively published. ## Snack compared with a local project | | Snack | Local project from `create-expo-app` | |---|---|---| | Setup | none, runs in the browser | Node and a package manager, plus simulators or a device | | Native modules | fixed set, like Expo Go | anything, through a development build | | Sharing | a link | a repository | | Builds and release | no | yes, with prebuild and EAS | | Best for | prototypes, snippets, reproductions | the actual app | ## Moving from a Snack to a project When the quiz prototype proves the idea, recreate it as a real project: scaffold with `npx create-expo-app`, copy the components across, and install each dependency with `npx expo install` so versions match the project's SDK. From there you can add native modules, a development build and a release pipeline, none of which Snack offers. ## Interview angle Interviewers ask about Snack to see whether a candidate knows the Expo toolbox and understands **why** it has limits: it is a hosted, fixed runtime like Expo Go, so the same native-module boundary that forces a development build locally also bounds what a Snack can run. A good answer names that boundary rather than just saying "it runs in the browser".
- A Snack that uses a library with its own native module fails to run; what is the fix?Move the code into a local project created with `create-expo-app` and run it in a development build, which compiles the library's native code into the app. Snack, like Expo Go, only has the native modules its runtime already includes, so no setting inside the Snack makes a new native module available.
- Why attach a Snack to a bug report instead of pasting code?A Snack is runnable: a maintainer opens the link and sees the failure on Android, iOS or web without setting up a project. It also forces a minimal reproduction, separated from the rest of the app, which is often where the real cause becomes obvious.
Snack is a demo kitchen at a trade show: you can cook anything with the appliances already installed and invite people to taste, but you cannot bring in a new oven; for that you need your own kitchen.
saying these in an interview costs you the question
- Snack can compile any npm library, including custom native code
- Snack requires installing Expo CLI locally first
- Snack projects can be released to the stores directly
- Snack only previews on the web, not on Android or iOS