Skip to content

swaminator/expo-cra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adding Expo

This project was bootstrapped with Create React App.

  • Install React Native for Web and React Native: yarn add react-native-web react-native
  • Create an app.json:
    {
        "expo": {
          "platforms": ["web"]
        }
    }
  • Install: yarn add -D babel-preset-expo
  • Create babel.config.js
    module.exports = {
      presets: ['babel-preset-expo'],
    };
  • Install the expo-cli with npm i -g expo-cli
  • Start the project with expo start --web
    • You may want to add .expo to your .gitignore.
    • (--web) will automatically open the web page in your browser.
    • Expo will only start the webpack dev server (and not metro) because "web" is the only platform defined in "platforms".
    • You can prevent the debug screen from opening with: --non-interactive
    • Toggle the production environment variable with --no-dev. This will persist commands so remember to turn it off with --dev.

Now you can import any of the react-native-web modules!

import { View } from 'react-native';

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published