🌐
Snack
snack.expo.dev › embedded
Platform API Example - Snack
Write code in Expo's online editor and instantly use it on your phone.
🌐
GitHub
github.com › expo › snack-sdk
GitHub - expo/snack-sdk: Snack SDK
Snack SDK. Contribute to expo/snack-sdk development by creating an account on GitHub.
Starred by 83 users
Forked by 27 users
Languages   JavaScript 98.4% | HTML 1.2% | CSS 0.4%
🌐
Expo Documentation
docs.expo.dev
Expo Documentation
Expo's Snack lets you try Expo with zero local setup.Create a Snack · Join over 60,000 other developers on the Expo Community Discord.Go to Discord · Expo supplies a vast array of SDK modules.
🌐
Expo Documentation
docs.expo.dev › versions › latest › sdk › notifications
Notifications - Expo Documentation
ArchiveExpo SnackDiscord and ForumsNewsletter · A library that provides an API to fetch push notification tokens and to present, schedule, receive and respond to notifications. Android (device only) iOS (device only) Ask AI · GitHub · npm ...
🌐
Medium
medium.com › @waadlingaadil › how-to-use-expo-snacks-in-react-native-lft-2-653853c9f503
How to use Expo Snacks in React Native: Lft #2 | by Aadil Mallick | Medium
January 5, 2023 - How to use Expo Snacks in React Native: Lft #2 Expo Snack is a great online tool for developing mobile apps with React Native — all in the browser. Let’s jump into how it works: If anyone is …
🌐
GitHub
github.com › expo › snack › blob › main › docs › snack-sdk-api › README.md
snack/docs/snack-sdk-api/README.md at main · expo/snack
URL of the saved Snack. The URL is empty when no save "id" is available. ... Last saved (non-draft) Expo SDK version. ... Expo SDK version. ... A close request that should be send using the browser sendBeacon API whenever the browser session is unloaded.
Author   expo
🌐
GitHub
github.com › expo › snack
GitHub - expo/snack: Expo Snack lets you run Expo in the browser.
It dynamically bundles and compiles code and runs it in the Expo Go or in a web-player. Code can be saved as "Snacks" and easily shared with others. Snacks can also be embedded to show "live" previews as used by the React Native documentation.
Starred by 470 users
Forked by 162 users
Languages   TypeScript 95.7% | JavaScript 2.1%
🌐
GitHub
github.com › expo › snack › blob › main › docs › snack-sdk.md
snack/docs/snack-sdk.md at main · expo/snack
Instead of using the url and a QR-code, it is also possible to associate the Snack with a particular device-id or a user account. This will cause the Snack to automatically show up in the "Recently in Development" section of the Expo client.
Author   expo
Find elsewhere
🌐
npm
npmjs.com › package › snack-sdk
snack-sdk - npm
The Expo Snack SDK. Latest version: 6.5.1, last published: 2 months ago. Start using snack-sdk in your project by running `npm i snack-sdk`. There are 3 other projects in the npm registry using snack-sdk.
      » npm install snack-sdk
    
Published   Aug 19, 2025
Version   6.5.1
Author   Expo
🌐
Snack
snack.expo.dev
Snack - React Native in the browser - Expo
Write code in Expo's online editor and instantly use it on your phone.
🌐
Snack
snack.expo.dev › embedded
Toast Android API Example - Snack
Write code in Expo's online editor and instantly use it on your phone.
🌐
Snack
snack.expo.dev › @benniekim › rest-api
REST API - Snack
Try this project on your phone! Use Expo's online editor to make changes and save your own copy.
🌐
Reddit
reddit.com › r/reactnative › does chatgpt api work on expo snack?
r/reactnative on Reddit: Does ChatGPT API work on Expo Snack?
March 6, 2023 -

Hi. I'm new to React Native and have been trying to build a toy app on Expo Snack to test connection with OpenAI's ChatGPT. No luck so far. Unsure if it's because there's something wrong with the code or that Snack can't connect to OpenAI's API.

The code is as following:

import React, { useState } from "react";
import {
  StyleSheet,
  Text,
  View,
  TextInput,
  Button,
} from "react-native";
import openai from "openai";

const App = () => {
  const [prompt, setPrompt] = useState("");
  const [response, setResponse] = useState("");

  const handleSubmit = async () => {
    const config = {
      apiKey: "MY_API_KEY",
    };
    const openaiClient = new openai.Client(config);
    const response = await openaiClient.Completion.create(
      {
        prompt: prompt,
        temperature: 0.7,
        top_p: 1.0,
      }
    );
    setResponse(response.choices[0].text);
  };

  return (
    <View style={styles.container}>
      <TextInput
        placeholder="Enter a prompt"
        value={prompt}
        onChangeText={setPrompt}
        style={styles.input}
      />
      <Button
        title="Submit"
        onPress={handleSubmit}
        style={styles.button}
      />
      <Text style={styles.response}>{response}</Text>
    </View>
  );
};

   const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: "center",
    alignItems: "center",
  },
  input: {
    width: 300,
    height: 40,
    borderColor: "#ccc",
    borderWidth: 1,
    padding: 10,
  },
  button: {
    width: 300,
    height: 40,
    backgroundColor: "#000",
    color: "#fff",
    borderRadius: 5,
  },
  response: {
    fontSize: 16,
    margin: 10,
  },
});

export default App;
🌐
Stack Overflow
stackoverflow.com › questions › 78856876 › how-to-resolve-absolute-path-using-snack-expo-dev
react native - How to resolve absolute path using snack expo dev? - Stack Overflow
I'm using snack expo dev: https://snack.expo.dev/@danilobatistaqueiroz/water-tracker · If I try to import a module using absolute path, I get an error because the path has duplicated src folder: Unable to resolve module://src/src/libraries/storage.js · //src/components/insights/insights.js import {saveData, getData} from '/src/libraries/storage'; ... //babel.config.js module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: [ [ "babel-plugin-root-import", { "rootPathPrefix": "@", "rootPathSuffix": "src", } ], [ 'module-resolver', { root: ["./"], alias: { assets: './assets', components: './src/components', libraries: './src/libraries' }, }, ], ], }; };
🌐
Embedly
embed.ly › provider › expo
Expo Snack Embed Provider | Embedly
Use the Embedly oEmbed API to embed Expo Snack rich embeds in your applications, blogs, or sites.
🌐
Snack
snack.expo.dev › embedded
Fetch Example - Snack
Write code in Expo's online editor and instantly use it on your phone.
🌐
Snack
snack.expo.dev › O4oPj8-Qz
products api call - Snack
Try this project on your phone! Use Expo's online editor to make changes and save your own copy.
🌐
Snack
snack.expo.dev
Snack - React Native in the browser
Write code in Expo's online editor and instantly use it on your phone.