mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-01 18:15:13 +00:00
Minor docs update
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
[React Native][react-native-url] components and APIs for the Web.
|
[React Native][react-native-url] components and APIs for the Web.
|
||||||
|
|
||||||
|
Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge.
|
||||||
|
|
||||||
## Quick start
|
## Quick start
|
||||||
|
|
||||||
To install in your app:
|
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
|
npm install --save react@0.14 react-dom@0.14 react-native-web
|
||||||
```
|
```
|
||||||
|
|
||||||
Or [try it on CodePen](http://codepen.io/necolas/pen/PZzwBR).
|
Read the [Client and Server rendering](docs/guides/rendering.md) guide.
|
||||||
|
|
||||||
Browser support: Chrome, Firefox, Safari >= 7, IE 10, Edge.
|
|
||||||
|
|
||||||
## Overview
|
## 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
|
padding. And the [`StyleSheet`](docs/guides/style.md) API converts styles
|
||||||
defined in JavaScript to "atomic" CSS.
|
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
|
```js
|
||||||
import React, { AppRegistry, Image, StyleSheet, Text, View } from 'react-native'
|
import React, { AppRegistry, Image, StyleSheet, Text, View } from 'react-native'
|
||||||
|
|||||||
@@ -1,5 +1,21 @@
|
|||||||
# Client and Server rendering
|
# 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
|
## Client-side rendering
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
Reference in New Issue
Block a user