Skip to content

Commit

Permalink
More Resources doc, updating Support doc and quickstart too
Browse files Browse the repository at this point in the history
Summary:
TLDR even more docs changes

So I created a More Resources doc that aggregates the high-quality-but-off-site stuff. Let's try to put more outlinks there. Also I removed the stuff on Support that was not support, and some misc changes to clean stuff up.
Closes facebook#8329

Differential Revision: D3471669

Pulled By: JoelMarcey

fbshipit-source-id: 54edd543ced1b3a8f3d0baca5475ac96bae6e487
  • Loading branch information
lacker authored and samerce committed Aug 23, 2016
1 parent db04093 commit 36a57b9
Show file tree
Hide file tree
Showing 14 changed files with 98 additions and 706 deletions.
2 changes: 1 addition & 1 deletion docs/Basics-Component-Image.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-image
title: Image
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-image.html
next: basics-component-view
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Component-ListView.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-listview
title: ListView
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-listview.html
next: basics-network
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Component-ScrollView.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-scrollview
title: ScrollView
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-scrollview.html
next: basics-component-listview
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Component-Text.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-text
title: Text
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-text.html
next: basics-component-image
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Component-TextInput.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-textinput
title: TextInput
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-textinput.html
next: basics-component-scrollview
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Component-View.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-component-view
title: View
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-component-view.html
next: basics-component-textinput
---
Expand Down
2 changes: 1 addition & 1 deletion docs/Basics-Components.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: basics-components
title: Components
layout: docs
category: Basics
category: The Basics
permalink: docs/basics-components.html
next: basics-component-text
---
Expand Down
8 changes: 4 additions & 4 deletions docs/Basics-IntegrationWithExistingApps.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
id: basics-integration-with-existing-apps
id: integration-with-existing-apps
title: Integration With Existing Apps
layout: docs
category: Basics
permalink: docs/basics-integration-with-existing-apps.html
next: sample-application-movies
category: Guides
permalink: docs/integration-with-existing-apps.html
next: style
---

<div class="integration-toggler">
Expand Down
4 changes: 2 additions & 2 deletions docs/Basics-Network.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
id: basics-network
title: Network
layout: docs
category: Basics
category: The Basics
permalink: docs/network.html
next: basics-integration-with-existing-apps
next: more-resources
---

One of React Native's goals is to be a playground where we can experiment with different architectures and crazy ideas. Since browsers are not flexible enough, we had no choice but to reimplement the entire stack. In the places that we did not intend to change anything, we tried to be as faithful as possible to the browser APIs. The networking stack is a great example.
Expand Down
48 changes: 48 additions & 0 deletions docs/MoreResources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
id: more-resources
title: More Resources
layout: docs
category: The Basics
permalink: docs/more-resources.html
next: integration-with-existing-apps
---

If you just read through this website, you should be able to build a pretty cool React Native app. But React Native isn't just a product made by one company - it's a community of thousands of developers. So if you're interested in React Native, here's some related stuff you might want to check out.

## Popular Libraries

If you're using React Native, you probably already know about [React](https://facebook.github.io/react/). So I feel a bit silly mentioning this. But if you haven't, check out React - it's the best way to build a modern website.

One common question is how to handle the "state" of your React Native application. The most popular library for this is [Redux](http://redux.js.org/). Don't be afraid of how often Redux uses the word "reducer" - it's a pretty simple library, and there's also a nice [series of videos](https://egghead.io/courses/getting-started-with-redux) explaining it.

If you're looking for a library that does a specific thing, check out [Awesome React Native](https://github.com/jondot/awesome-react-native), a curated list of components that also has demos, articles, and other stuff.

## Example Apps

There are a lot of example apps at the [React Native Playground](https://rnplay.org/apps/picks). You can see the code running on a real device, which is a neat feature.

The folks who built the app for Facebook's F8 conference in 2016 also [open-sourced the code](https://github.com/fbsamples/f8app) and wrote up a [detailed series of tutorials](http://makeitopen.com/tutorials/building-the-f8-app/planning/). This is useful if you want a more in-depth example that's more realistic than most sample apps out there.

## Development Tools

[Nuclide](https://nuclide.io/) is the IDE that Facebook uses internally for React Native development. The killer feature of Nuclide is its debugging ability. It also has great inline Flow support.

[Ignite](https://github.com/infinitered/ignite) is a starter kit that uses Redux and a few different common UI libraries. It has a CLI to generate apps, components, and containers. If you like all of the individual tech choices, Ignite could be perfect for you.

[CodePush](https://microsoft.github.io/code-push/) is a service from Microsoft that makes it easy to deploy live updates to your React Native app. If you don't like going through the app store process to deploy little tweaks, and you also don't like setting up your own backend, give CodePush a try.

[Exponent](http://docs.getexponent.com/versions/v6.0.0/index.html) is a development environment plus application that focuses on letting you build React Native apps in the Exponent development environment, without ever touching Xcode or Android Studio. If you wish React Native was even more JavaScripty and webby, check out Exponent.

[Deco](https://www.decosoftware.com/) is an all-in-one development environment specifically designed for React Native. It can automatically set up a new project, search for open source components, and insert them. You can also tweak your app graphically in real time. Check it out if you use macOS.

## Where React Native People Hang Out

The [React Native Community](https://www.facebook.com/groups/react.native.community) Facebook group has thousands of developers, and it's pretty active. Come there to show off your project, or ask how other people solved similar problems.

[Reactiflux](https://discord.gg/0ZcbPKXt5bZjGY5n) is a Discord chat where a lot of React-related discussion happens, including React Native. Discord is just like Slack except it works better for open source projects with a zillion contributors. Check out the #react-native channel.

The [React Twitter account](https://twitter.com/reactjs) covers both React and React Native. Following that account is a pretty good way to find out what's happening in the world of React.

There are a lot of [React Native Meetups](http://www.meetup.com/topics/react-native/) that happen around the world. Often there is React Native content in React meetups as well.

Sometimes we have React conferences. We posted the [videos from React.js Conf 2016](https://www.youtube.com/playlist?list=PLb0IAmt7-GS0M8Q95RIc2lOM6nc77q1IY), and we'll probably have more conferences in the future, too. Stay tuned.
122 changes: 25 additions & 97 deletions docs/QuickStart-GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
id: quick-start-getting-started
title: Getting Started
layout: docs
category: Quick Start
category: The Basics
permalink: docs/getting-started.html
next: basics-components
---
Expand Down Expand Up @@ -50,134 +50,93 @@ block { display: none; }

## Unsupported

<div>Unfortunately, Apple only lets you develop for iOS on a Mac machine. Please check out the <a href="" onclick="display('platform', 'android')">Android</a> instructions instead.</div>
<div>Unfortunately, Apple only lets you develop for iOS on a Mac. If you want to build an iOS app but you don't have a Mac yet, you can try starting with the <a href="" onclick="display('platform', 'android')">Android</a> instructions instead.</div>

<center><img src="img/react-native-sorry-not-supported.png" width="150"></img></center>

<!-- ######### MAC for iOS ##################### -->

<block class="mac ios" />

## Installing React Native
## Dependencies

There's a few things you need to install first. You will need Node.js, the React Native command line tools, Watchman, and Xcode.
You will need Xcode, node.js, the React Native command line tools, and Watchman.

<block class="mac android" />

## Installing React Native
## Dependencies

There's a few things you need to install first. You will need Node.js, the React Native command line tools, Watchman, and Android Studio.
You will need Android Studio, node.js, the React Native command line tools, and Watchman.

<block class="mac ios android" />

#### Node.js

We recommend installing Node.js via [Homebrew](http://brew.sh/), a popular package manager for OS X:
We recommend installing node and watchman via [Homebrew](http://brew.sh/).

```
brew install node
brew install watchman
```

#### React Native command line tools

Use Node's package manager to install the React Native command line tools. These will allow you to easily create your first React Native project.
Node comes with npm, which lets you install the React Native command line interface.

```
npm install -g react-native-cli
```

> If you see the error, `EACCES: permission denied`, please run the command:
> `sudo npm install -g react-native-cli`.
#### Watchman

[Watchman](https://facebook.github.io/watchman/docs/install.html) is a tool by Facebook for watching
changes in the filesystem. It is recommended you install it for better performance.

```
brew install watchman
```
If you get a permission error, try with sudo: `sudo npm install -g react-native-cli`.

<block class="mac ios" />

#### Xcode

You can install Xcode via the [Mac App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12), or download it directly from the [Apple Developer portal](https://developer.apple.com/xcode/downloads/).
The easiest way to install Xcode is via the [Mac App Store](https://itunes.apple.com/us/app/xcode/id497799835?mt=12).

<block class="mac android" />

#### Android Studio

Download and install [Android Studio](https://developer.android.com/studio/install.html).

#### Gradle Daemon

While optional, enabling [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) will greatly improve incremental build times for changes in Java code.
If you plan to make changes in Java code, we recommend [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) which speeds up the build.


<!-- ######### LINUX and WINDOWS for ANDROID ##################### -->

<block class="linux windows android" />

## Installing React Native
## Dependencies

There's a few things you need to install first. You will need Node.js, the React Native command line tools, Watchman, and Android Studio.

<block class="linux windows android" />

#### Node.js
You will need node.js, the React Native command line tools, Watchman, and Android Studio.

<block class="linux android" />

Follow the [installation instructions for your Linux distribution](https://nodejs.org/en/download/package-manager/) to install Node.js 4 or newer.

<block class='windows android' />

We recommend installing Node.js via [Chocolatey](https://chocolatey.org), a popular package manager for Windows. Open a Command Prompt as Administrator, then run the following command:
We recommend installing node.js and Python2 via [Chocolatey](https://chocolatey.org), a popular package manager for Windows. Open a Command Prompt as Administrator, then run:

```
choco install nodejs.install
```

##### Python

The React Native command line tools require Python2. Install it using Chocolatey:

```
choco install python2
```

<block class="windows linux android" />

#### React Native command line tools

Use Node's package manager to install the React Native command line tools. These will allow you to easily create your first React Native project.
Node comes with npm, which lets you install the React Native command line interface.

```
npm install -g react-native-cli
```

> If you see the error, `EACCES: permission denied`, please run the command:
> `sudo npm install -g react-native-cli`.
<block class="windows linux android" />

#### Android Studio

Download and install [Android Studio](https://developer.android.com/studio/install.html).

<block class="linux android" />

#### Watchman

[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. It is recommended you install
it for better performance. You can follow the [Watchman installation guide](https://facebook.github.io/watchman/docs/install.html#installing-from-source) to compile and install from source.
[Watchman](https://facebook.github.io/watchman) is a tool by Facebook for watching changes in the filesystem. Installing it should
improve performance, but you can also try not installing it, if the installation process is too annoying. You can follow the [Watchman installation guide](https://facebook.github.io/watchman/docs/install.html#installing-from-source) to compile and install from source.

<block class="windows linux android" />

#### Gradle Daemon

While optional, enabling [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) will greatly improve incremental build times for changes in Java code.
If you plan to make changes in Java code, we recommend [Gradle Daemon](https://docs.gradle.org/2.9/userguide/gradle_daemon.html) which speeds up the build.

<block class="mac ios android" />

Expand All @@ -193,13 +152,7 @@ cd AwesomeProject
react-native run-ios
```

If everything is set up correctly, you should see your new app running in the iOS Simulator shortly.

> You can also
> [open the `AwesomeProject`](http://nuclide.io/docs/quick-start/getting-started/#adding-a-project)
> folder in [Nuclide](http://nuclide.io) and
> [run the application](http://nuclide.io/docs/platforms/react-native/#command-line), or open
> `ios/AwesomeProject.xcodeproj` and hit the `Run` button in Xcode.
You should see your new app running in the iOS Simulator shortly. `react-native run-ios` is just one way to run your app - you can also run it directly from within Xcode or Nuclide.

<block class="mac android" />

Expand All @@ -211,12 +164,7 @@ cd AwesomeProject
react-native run-android
```

If everything is set up correctly, you should see your new app running in your Android emulator shortly.

> You can also
> [open the `AwesomeProject`](http://nuclide.io/docs/quick-start/getting-started/#adding-a-project)
> folder in [Nuclide](http://nuclide.io) and
> [run the application](http://nuclide.io/docs/platforms/react-native/#command-line).
If everything is set up correctly, you should see your new app running in your Android emulator shortly. `react-native run-android` is just one way to run your app - you can also run it directly from within Android Studio or Nuclide.

<block class="mac ios android" />

Expand Down Expand Up @@ -274,35 +222,15 @@ Now that you have successfully run the app, let's modify it.

### That's it!

Congratulations! You've successfully run and modified your first React Native app.
Congratulations! You've successfully run and modified a React Native app.

<center><img src="img/react-native-congratulations.png" width="150"></img></center>

<block class="mac ios android" />

## Common Followups

- Learn how to access the Developer Menu, reload your JavaScript, access logs, and more in the [Debugging guide](docs/debugging.html#content).

<block class="mac ios" />

- If you want to run on a physical device, see the [Running on iOS Device page](docs/running-on-device-ios.html#content).

<block class="mac android" />

- If you want to run on a physical device, see the [Running on Android Device page](docs/running-on-device-android.html#content).

<block class="mac ios android" />

- If you run into any issues getting started, see the [Troubleshooting](docs/troubleshooting.html#content) page.

<block class="windows linux android" />

## Common Followups
<block class="mac windows linux ios android" />

- Learn how to access the Developer Menu, reload your JavaScript, access logs, and more in the [Debugging guide](docs/debugging.html#content).
## Special Cases

- If you want to run on a physical device, see the [Running on Android Device page](docs/running-on-device-android.html#content).
- This page explains how to create a new React Native app. If you are adding React Native components to an existing application, check out the [Integration guide](docs/integration-with-existing-apps.html).

- If you run into any issues getting started, see the [Troubleshooting](docs/troubleshooting.html#content) page.

Expand Down
8 changes: 0 additions & 8 deletions docs/SampleApplication-F8App.md

This file was deleted.

Loading

0 comments on commit 36a57b9

Please sign in to comment.