Skip to content

Commit

Permalink
Adding example on README
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrachet committed Jul 16, 2017
1 parent a7d6ef9 commit 815ef33
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
5 changes: 3 additions & 2 deletions ExampleExpo/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ Display some placeholder stuff before rendering your text or media content in Re

------

## Content
# Content

- <a href="#usage">How to use it ?</a>
- [Components available](./API.md)
- [Creating a custom component](./API.md#custom)
- [Using default animations](./ANIMATIONS.md#default)
- [Using a custom animation](./ANIMATIONS.md#custom)
- [Animation API](./ANIMATIONS.md) <span style="color:red">(deprecated in >=v1.0.0)</span>
- [Examples from React Native and Expo](#examples)

<h2 name="#usage">Usage</h2>
<h1 name="#usage">Usage</h1>

### Installation
```javascript
Expand Down Expand Up @@ -57,3 +58,47 @@ render() {
```

When the value of `this.state.isReady` changes to something *existing*, the `<Text>` component will be rendered

<h1 name="#examples">See examples</h1>

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/) :

<img src="https://img4.hostingpics.net/pics/589414Capturedecran20170716a122129.png" width="200"/>

#### 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
```

0 comments on commit 815ef33

Please sign in to comment.