From 2b90bd736fb113b097e0e67fed7f9b3216a5db46 Mon Sep 17 00:00:00 2001 From: Nicolas Gallagher Date: Fri, 19 Feb 2016 13:17:39 -0800 Subject: [PATCH] Minor docs update --- README.md | 15 ++++++++++----- docs/guides/rendering.md | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5f22a7fb..af4c6650 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ [React Native][react-native-url] components and APIs for the Web. +Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge. + ## Quick start To install in your app: @@ -14,9 +16,7 @@ To install in your app: npm install --save react@0.14 react-dom@0.14 react-native-web ``` -Or [try it on CodePen](http://codepen.io/necolas/pen/PZzwBR). - -Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge. +Read the [Client and Server rendering](docs/guides/rendering.md) guide. ## Overview @@ -29,9 +29,14 @@ common layouts with flexbox, such as stacked and nested boxes with margin and padding. And the [`StyleSheet`](docs/guides/style.md) API converts styles defined in JavaScript to "atomic" CSS. -## Example +## Examples -More examples can be found in the [`examples` directory](examples). +Demos: + +* [React Native for Web: Playground](http://codepen.io/necolas/pen/PZzwBR). +* [TicTacToe](http://codepen.io/necolas/full/eJaLZd/) + +Example: ```js import React, { AppRegistry, Image, StyleSheet, Text, View } from 'react-native' diff --git a/docs/guides/rendering.md b/docs/guides/rendering.md index dbd1030d..f192d454 100644 --- a/docs/guides/rendering.md +++ b/docs/guides/rendering.md @@ -1,5 +1,21 @@ # Client and Server rendering +It's recommended that you use a module loader that supports package aliases +(e.g., webpack), and alias `react-native` to `react-native-web`. + +```js +// webpack.config.js + +module.exports = { + // ...other configuration + resolve: { + alias: { + 'react-native': 'react-native-web' + } + } +} +``` + ## Client-side rendering ```js