mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
7ed9f0dfb3
Summary: Simplified Networking Guide, based on the old Network polyfill doc. This guide strongly recommends using fetch, while still informing the user about React Native's support for other libraries. In order to provide an actual working networking example, a `movies.json` file is added at the root of the site, allowing the user to fetch a small blob of JSON: ``` fetch('http://facebook.github.io/react-native/movies.json') ``` ![networking](https://cloud.githubusercontent.com/assets/165856/16321804/d2bd7c6a-3953-11e6-9fc5-30baaa38d7a4.png) Closes https://github.com/facebook/react-native/pull/8381 Differential Revision: D3479018 Pulled By: lacker fbshipit-source-id: 1f2078bf2414a13f7f77d5af55b08948909093a3
Install prerequisites
Before running the website, make sure you've run the following:
git clone https://github.com/facebook/react-native.git
cd react-native
npm install
Run the website server
The first time, get all the website dependencies loaded via
cd website
npm install
Then, run the server via
npm start
open http://localhost:8079/react-native/index.html
Anytime you change the contents, just refresh the page and it's going to be updated.
Publish the website
cd website
npm run publish-website