From 815ef33252651213b38bf03fc61080a86fdc4be2 Mon Sep 17 00:00:00 2001 From: mfrachet Date: Sun, 16 Jul 2017 12:26:01 +0200 Subject: [PATCH] Adding example on README --- ExampleExpo/package.json | 5 ++-- README.md | 49 ++++++++++++++++++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/ExampleExpo/package.json b/ExampleExpo/package.json index 2f923bc..717eb00 100644 --- a/ExampleExpo/package.json +++ b/ExampleExpo/package.json @@ -1,7 +1,8 @@ { - "name": "ExampleExpo", + "name": "rn-placeholder-demo", "version": "0.1.0", - "private": true, + "private": false, + "description": "Simple demo of rn-placeholder project", "devDependencies": { "react-native-scripts": "0.0.50", "jest-expo": "~18.0.0", diff --git a/README.md b/README.md index 5d66b6e..2d26c15 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Display some placeholder stuff before rendering your text or media content in Re ------ -## Content +# Content - How to use it ? - [Components available](./API.md) @@ -23,8 +23,9 @@ Display some placeholder stuff before rendering your text or media content in Re - [Using default animations](./ANIMATIONS.md#default) - [Using a custom animation](./ANIMATIONS.md#custom) - [Animation API](./ANIMATIONS.md) (deprecated in >=v1.0.0) +- [Examples from React Native and Expo](#examples) -

Usage

+

Usage

### Installation ```javascript @@ -57,3 +58,47 @@ render() { ``` When the value of `this.state.isReady` changes to something *existing*, the `` component will be rendered + +

See examples

+ +Get `rn-placeholder` on your computer by cloning this repo : + +``` +$ git clone https://github.com/mfrachet/rn-placeholder +$ cd rn-placeholder +``` + +## Usage with Expo + +#### Using the Expo projects tool + +If you're familliar with Expo, you can take a look at the [rn-placeholder-demo](https://expo.io/@mfrachet/rn-placeholder-demo) app. + +You can also scan the following QR using [Expo app](https://expo.io/) : + + + +#### Expo XDE + +If you're currently using [Expo XDE](https://github.com/expo/xde), simply open `./ExampleExpo` inside of it, and share your project as usual. + +#### create-react-native-app + +If you're currently using [`create-react-native-app`](https://facebook.github.io/react-native/docs/getting-started.html#getting-started) + +``` +$ cd ExampleExpo +$ npm start +``` + +And then scan the QR inside of the [Expo app](https://expo.io/) + +## Usage with react-native-cli + +If you're currently using [`react-native-cli`](https://facebook.github.io/react-native/docs/getting-started.html#the-react-native-cli), inside of `rn-placeholder` root folder : + +``` +$ cd Example +$ react-native run-ios +$ react-native run-android +```