1.0.0 • Published 7 years ago
react-expo-snack v1.0.0
react-expo-snack
Prerequisites
Node.js >= 6 must be installed.
Installation
- Running
npm installin the component's root directory will install everything you need for development.
Demo Development Server
npm startwill run a development server with the component's demo app at http://localhost:3000 with hot module reloading.
Building
npm run buildwill build the component for publishing to npm and also bundle the demo app.npm run cleanwill delete built resources.
Using
Installing
npm install --save react-expo-snackReact
Props
id: The ID of the snack being show. Old and new format is supported (ex: @broonix/mature-apple vs r1hCVAaEZ) preview: Enable or disable the device preview area. platform: Which platform to preview with. values: 'ios' or 'android' theme: Which platform to preview with. values: 'dark' or 'light' height: The height of the embed. Must be a number > 0 defaults to 505.
import React, { Component } from 'react'
import ExpoSnack from 'react-expo-snack'
class YourComponent extends Component {
render() {
return (
<div>
<ExpoSnack id="@broonix/mature-apple"/>
</div>
)
}
}1.0.0
7 years ago