Commit Graph

848 Commits

Author SHA1 Message Date
Kevin Lacker a023d0d057 remove inaccurate docs
Summary:
Our docs suggest using this babel plugin to remove console.log statements in production. Unfortunately, it does not actually work when you run it on a new React Native project, and the root cause is that the plugin does not handle all cases correctly. See discussion in https://github.com/facebook/react-native/issues/10412 . For now, we should just stop recommending that people use this plugin, because it doesn't work.
Closes https://github.com/facebook/react-native/pull/12315

Differential Revision: D4538567

Pulled By: hramos

fbshipit-source-id: f3ae1b9143130a05601907ee902a02fc0b2818b0
2017-02-09 13:32:31 -08:00
Andrew Rabon 787e2730aa Fix ADB reverse link + release build instructions
Summary:
ADB reverse link was broken, and the "release build" instructions did not work (--configuration doesn't exist.)
Closes https://github.com/facebook/react-native/pull/12312

Differential Revision: D4538302

Pulled By: hramos

fbshipit-source-id: 6d2e7ee07f9fad6080ed79bc8e0e4db11e6bbed3
2017-02-09 13:01:37 -08:00
Jonas Helfer e8ba333e0a Tiny grammar fix
Summary:
> Explain the **motivation** for making this change. What existing problem does the pull request solve?

Comments with correct grammar are easier to read.
Closes https://github.com/facebook/react-native/pull/12313

Differential Revision: D4538229

Pulled By: hramos

fbshipit-source-id: 69978df3659f2d3e4f5b2ccb4ff6c33dc6b7e56b
2017-02-09 12:47:04 -08:00
Kevin Lacker f43d0a9678 Clearer information regarding RCT_EXPORT_MODULE
Summary:
I think this update is Critical as I wanted to add a different module name to be the same as the Android module name. I simply lost 6 hours until I found out that the Macro does not accept String syntax. Almost drove me crazy. Please, at least do something about it. Thanks.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI
Closes https://github.com/facebook/react-native/pull/11634

Differential Revision: D4533312

Pulled By: lacker

fbshipit-source-id: 2c547f791ed76ba62e0c7e5cabc2830dbae34075
2017-02-08 16:46:13 -08:00
Kevin Lacker edd957007d Docs: add warining about possible memory leaks while using native mod…
Summary:
Currently callbacks passed to native method are stored in [MessageQueue](https://github.com/facebook/react-native/blob/master/Libraries/BatchedBridge/MessageQueue.js#L160-L162) and [will be removed after invocation](https://github.com/facebook/react-native/blob/master/Libraries/BatchedBridge/MessageQueue.js#L273-L274), so to avoid memory leak in js-side the passed callback(s) must be invoked by native method.

Because of this significant nuance of callbacks usage, which is not (or not directly) mentioned  in docs, we have gained huge increase of ooms count in our app. So, I think this warning will help other developers to avoid this issue
Closes https://github.com/facebook/react-native/pull/11444

Differential Revision: D4532764

Pulled By: lacker

fbshipit-source-id: 34e99fa4944c3333b2198c1abd53c0da10732749
2017-02-08 16:00:12 -08:00
moses gunesch 28ea2d6261 Add static non-image assets section
Summary:
Support for non-image assets like audio and video was added a while back
Closes https://github.com/facebook/react-native/pull/12053

Differential Revision: D4489209

Pulled By: mkonicek

fbshipit-source-id: 4e2bdf7ef07bcc8c563c055ed0a4fe5cc51bd0bc
2017-01-31 13:28:32 -08:00
Paul Mestemaker 8378f0f9f7 Ensure documentation has consistent relative links
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

I had tried fixing a broken link in a previous commit (#11453). My commit was merged, but it did not resolve the underlying problem. I have looked into how links should be formed for the docs and have fixed the original problem as well as updated all other links to be consistent.

Previous link formats:

- /docs/sample.html <-- broken link
- sample.html <-- broken link
- https://facebook.github.io/react-native/docs/sample.html <-- works
- /react-native/docs/sample.html <-- works
- docs/sample.html <-- works (permalink format)

This PR updates all links to the permalink format.

**Test plan (required)**
I ran the website locally and manually tested half of the links in each category. They all worked.
```
$ cd website
$ npm install && npm start
```
Closes https://github.com/facebook/react-native/pull/12064

Differential Revision: D4489153

Pulled By: mkonicek

fbshipit-source-id: bf0231d941ba147317595c3b3466dc579a887169
2017-01-31 12:13:31 -08:00
fcFn 7ed529bf2f Fix typo in GestureResponderSystem.md
Summary:
There is only `timestamp `property in touch native event, `event.nativeEvent.timeStamp` is undefined.
Closes https://github.com/facebook/react-native/pull/11988

Differential Revision: D4489408

Pulled By: mkonicek

fbshipit-source-id: 0148a4107124438f345b8cb584e1832ba51b3a4b
2017-01-31 11:58:30 -08:00
Jones Melton ad97adb3c7 Correct minor phrasing error for clarity
Summary:
A simple correction of what looks like a copy-paste error in the writeup of NavigationExperimental.
Closes https://github.com/facebook/react-native/pull/12081

Differential Revision: D4482725

Pulled By: mkonicek

fbshipit-source-id: 8c7c6ad19ed96e3287b4d0ef809685b5201b4fc0
2017-01-30 11:13:41 -08:00
David Brownman 7cebe26681 use https for bash links
Summary:
Never a good idea to pipe a bash file from `http` into `sudo`. Using `https` mitigates some of this risk.
Closes https://github.com/facebook/react-native/pull/12090

Differential Revision: D4474065

fbshipit-source-id: 99d29ae112ae0edef5bd662d439b5da673c5c79f
2017-01-26 23:43:47 -08:00
kvg452@sina.com 5bb19a5bf5 Add 'Android SDK Platform 23' to check list
Summary:
Add 'Android SDK Platform 23' to the check list when install the proper Android SDK.

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of the rest of the codebase. See also the simple [style guide](https://github.c
Closes https://github.com/facebook/react-native/pull/11744

Differential Revision: D4464520

Pulled By: hramos

fbshipit-source-id: 2cfabdadc8a94f35cbbd37d9dce46375e8b954c3
2017-01-25 14:28:28 -08:00
Seong-hyun, Oh 4ff659345c Update NativeComponentsIOS.md
Summary:
Only NativeComponentsIOS.md documentation changed.

Closes https://github.com/facebook/react-native/pull/12012

Differential Revision: D4452008

Pulled By: ericvicenti

fbshipit-source-id: 9ee748165a4efc9f987c5cadff8a21ab17f971c6
2017-01-23 14:43:28 -08:00
C. T. Lin 29a996c83e variant -> configuration
Summary: Closes https://github.com/facebook/react-native/pull/11909

Differential Revision: D4432605

Pulled By: hramos

fbshipit-source-id: 760d043da383aa14a331d8420f6f28647edb046c
2017-01-23 11:28:51 -08:00
Louis Lagrange fa21822241 Fix some typos in NativeModulesAndroid.md
Summary:
Hi, here are some typo fixes in the documentation related to Android native modules:
* Add missing package and imports for the second part of the basic tutorial (register module)
* Add missing `public` keyword
* Remove incongruous word
Closes https://github.com/facebook/react-native/pull/11938

Differential Revision: D4439220

Pulled By: hramos

fbshipit-source-id: e7086fe384ed6238306abf0ee72c944fac53ad7b
2017-01-19 17:13:28 -08:00
AgtLucas dd8231ad63 Fix Android debugging doc
Summary:
I've tried to debug my Android app using Stetho as is documented [here](https://facebook.github.io/react-native/docs/debugging.html#debugging-with-stetho-http-facebook-github-io-stetho-on-android), but, it turns out the documentation is wrong, because if we pass `Bundle savedInstanceState` to `onCreate` method, the app crashes itself, so I've updated the documentation accordingly.
Closes https://github.com/facebook/react-native/pull/11796

Differential Revision: D4437893

Pulled By: hramos

fbshipit-source-id: fbb026e4480ae08128404ed2cf4ddb00a35f7d7b
2017-01-19 14:13:30 -08:00
Mehdi Mulani 81c33b542d Switch out DISABLE_YELLOW_BOX for IS_TESTING
Summary: Switch to using IS_TESTING on the Platform module. While IS_TESTING has to be explicitly set in the test harness, this makes it more usable and stops people from relying on brittle variables in the (larger) environment.

Reviewed By: fkgozali

Differential Revision: D4423661

fbshipit-source-id: 27a80867778b9374bcba67b69f9c93d32c0a74b0
2017-01-18 12:28:42 -08:00
Peter Salanki 52d8851fc8 Cache policy control for image source
Summary:
In the context of an app an image exists in three resolutions on the server: `thumb` (30px) `feed` (300px) `full` (900px). When looking at an individual item a user can come either from the feed, via a permalink or from other parts of the app. This allows a situation where the `feed` image might or might not already be loaded somewhere in the app. In the detail view I want to render `thumb` with a blur (to quickly display something), then the `feed` image if it exists to have something decent to display until `full` loads. However it is quite a waste to load the `feed` image if it isn't already in cache, and will slow down the time until `full` is loaded. It is possible to track the navigation from feed->detail and that the `feed` image has actually completed loading by the feed component however as component hierarchies grow this turns into quite a lot of prop passing and bad separation of concerns.

NSURLRequests accepts a [Cache Policy](https://developer.apple.com/reference/fo
Closes https://github.com/facebook/react-native/pull/10844

Differential Revision: D4425959

Pulled By: lacker

fbshipit-source-id: 679835439c761a2fc894f56eb6d744c036cf0b49
2017-01-17 17:13:31 -08:00
janus_wel bc432ae324 fix typo RTC to RCT
Summary:
Explain the **motivation** for making this change. What existing problem does the pull request solve?

Descriptions about class names are incorrect.
Closes https://github.com/facebook/react-native/pull/11898

Differential Revision: D4418957

fbshipit-source-id: fc7d0b61149ed9f850a436a35ad98f179b5e3e19
2017-01-13 18:58:23 -08:00
Mehdi Mulani 49d7c00500 Disable yellow box warnings based on environment variable
Summary:
This adds a hook to let you disable yellow box warnings. It's useful for native engineers who don't want to mess with JS but also for CI/testing, where the app operates mostly as a blackbox.

Depends on D4395091

Reviewed By: achen1

Differential Revision: D4395552

fbshipit-source-id: 4c3a9676caa975c537d1a4711d60aab2f404db15
2017-01-13 12:28:31 -08:00
sunnylqm d0116d52bd typo (data -> intent)
Summary: Closes https://github.com/facebook/react-native/pull/11856

Differential Revision: D4409174

Pulled By: foghina

fbshipit-source-id: 9b3f75d5f0515294e3b48dc3d9284b0cf684d152
2017-01-12 10:13:33 -08:00
Yann Pringault a1d77af07c Fix minor typo in PixelRatio.md
Summary:
iphone -> iPhone
Closes https://github.com/facebook/react-native/pull/11802

Differential Revision: D4397404

fbshipit-source-id: 116fe8b52de2a1db884ed10863cb1835304f8efb
2017-01-10 01:28:26 -08:00
Rob Hogan 8729d27206 Document subclassing RCTEventEmitter
Summary:
Sending global events with `eventDispatcher` has been [deprecated](d9737571c4) since 0.28, with a recommendation to subclass `RCTEventEmitter` instead, but there were no docs for this.

This updates the iOS native module to use the recommended way, and also documents the use of `stopObserving` and `startObserving`.

Tested and working in a real app.

cc nicklockwood
Closes https://github.com/facebook/react-native/pull/11792

Differential Revision: D4394626

fbshipit-source-id: 68b26d35944a521bf683a50ec1ab21f03b5e99d8
2017-01-09 14:43:50 -08:00
Neil Sarkar 2e4be1c2c9 Update NativeComponentsIOS.md
Summary:
Documentation-only change.

Reflects reference change from `RCTViewManager.h` to `React/RCTViewManager.h`
Closes https://github.com/facebook/react-native/pull/11756

Differential Revision: D4392028

Pulled By: ericvicenti

fbshipit-source-id: 7655817b0660738b8e45d18a5eda04f029259c5f
2017-01-09 00:13:33 -08:00
Rob Hogan c31f44814c - Update iOS native module #imports
Summary:
`#import` paths changed in 0.40 - this updates the docs accordingly.
Closes https://github.com/facebook/react-native/pull/11765

Differential Revision: D4390996

fbshipit-source-id: 3b391fe6e462952efa461bb61fc91675611e3dfa
2017-01-07 12:13:33 -08:00
Joshua Pinter 48623f749c Add trailing curly bracket.
Summary: Closes https://github.com/facebook/react-native/pull/11763

Differential Revision: D4390599

fbshipit-source-id: 5e58c2469d9110af4668c335b959ef20a5898031
2017-01-06 22:58:36 -08:00
Yao Bin 69b17ff48e Update SignedAPKAndroid.md
Summary:
Update docs to prevent build process from failing when collaborators do not have MYAPP_RELEASE_STORE_FILE in their env.

Build process often fails when following the existing documentation on setting the signingConfigs in build.gradle, as not all collaborators have the required ENV set in their gradle.properties
Closes https://github.com/facebook/react-native/pull/11716

Differential Revision: D4389150

Pulled By: hramos

fbshipit-source-id: 37941382950fac41f19d19317f49769588b135b4
2017-01-06 15:43:29 -08:00
Jacob Jimenez e7e65a36b9 Updated a command
Summary:
The command at line 90 does not work anymore, updated to reflect current revision.
Closes https://github.com/facebook/react-native/pull/11635

Differential Revision: D4389138

Pulled By: hramos

fbshipit-source-id: 4ac071ba2d47aa6bfbe7fb2ccaaf9800aa9e7e68
2017-01-06 15:13:29 -08:00
Matt Johnston 593c4909c6 Update UnderstandingCLI.md
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

> **Unless you are a React Native release maintainer and cherry-picking an *existing* commit into a current release, ensure your pull request is targeting the `master` React Native branch.**

Explain the **motivation** for making this change. What existing problem does the pull request solve?

There was a small error in the documentation that referenced the unlink command as an example, when the code in the example was actually from the link command.

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

Make sure tests pass on both Travis and Circle CI.

**Code formatting**

Look around. Match the style of t
Closes https://github.com/facebook/react-native/pull/11746

Differential Revision: D4387025

fbshipit-source-id: 152adc4b5cc4b467d3cf2399d2273c31b10c4b64
2017-01-06 08:28:25 -08:00
Eric Vicenti 257794762e IntegrationWithExsistingApps Android Update
Summary:
Added permission code to handle the user permission accepted or denied cases which causes potential app crashing if not handled. Only a small piece of code added to the guide to resolve an issue I was facing with permission.

The app that I was testing following the guide available, it was crashing showing permission denied error on the android monitor, and there was no step for how to resolve the issue. So I tried out a solution so thought would share it on the official Guide to help people who are stuck with the same issue.
Closes https://github.com/facebook/react-native/pull/11687

Differential Revision: D4377882

Pulled By: ericvicenti

fbshipit-source-id: a7db104c7c1b7e1fb2590c83118715840c17927b
2017-01-03 11:28:33 -08:00
Michal Srb 54edc75dc0 Update Running on Device guide with correct iOS menu
Summary: Closes https://github.com/facebook/react-native/pull/11620

Differential Revision: D4374419

Pulled By: mkonicek

fbshipit-source-id: 035c2d4a65bc1b191b9b5563098632d10dd9734c
2016-12-29 16:28:36 -08:00
Michal Srb 5dfc007af3 Fix Running On Device guide for iOS
Summary:
Doing this from web so won't be able to screenshot the results. (also inadvertently deleted a line, oh well...)
Closes https://github.com/facebook/react-native/pull/11625

Differential Revision: D4366928

Pulled By: mkonicek

fbshipit-source-id: 966a3d8b90dde49b1de06e0249df110245943825
2016-12-26 03:43:31 -08:00
Andrej Badin c65aa545f2 add import for Promise interface
Summary:
Missing import might be misleading for less skilled devs.
Closes https://github.com/facebook/react-native/pull/11550

Differential Revision: D4358540

Pulled By: hramos

fbshipit-source-id: 1dada9f2ad179a64006c556c6e08e936fcc8f231
2016-12-21 12:13:32 -08:00
sunnylqm 4e466d4c8a Update AndroidBuildingFromSource.md
Summary:
Local Maven repository for Support Libraries -> Android Support Repository
someone so moody
Closes https://github.com/facebook/react-native/pull/11360

Differential Revision: D4339960

Pulled By: lacker

fbshipit-source-id: 04e92d07413184e86fca3034a4a16a6e689da87e
2016-12-16 09:58:35 -08:00
Dayne Wright eb43f155b4 Updated Mac/Linux ANDROID_HOME path to include ${HOME}
Summary:
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:

Using `~` in the `.bashrc` or `.zshrc` fails inside of double quotes.  By changing this to `$HOME` the path is exported correctly in all instances.

Explain the **motivation** for making this change. What existing problem does the pull request solve?

It corrects the path to the Android home location if SDK is installed via Android Studio. Using `~` for the home path is failing.  By added `$HOME` you are guaranteed the correct path.

Prefer **small pull requests**. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.

**Test plan (required)**

Install Android Studio & SDK.
Set environment variable in `.bashrc` or `.zshrc` with `${HOME}/Library/Android/sdk` instead of `~/Library/Android/sdk`

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the p
Closes https://github.com/facebook/react-native/pull/11461

Differential Revision: D4327870

Pulled By: JoelMarcey

fbshipit-source-id: 903a84504f6288c73ac39a8f3b8800ededbdccf9
2016-12-14 15:28:31 -08:00
Kevin Lacker affd5ac681 Improve Android testing scripts
Summary:
The goal of this pull request is to make it easier for contributors to run Android tests locally, specifically the unit tests and integration tests. I added a bunch of checks to the local testing scripts that will warn you if your environment is misconfigured, and tell you how to fix it. I also updated the testing docs, so that the regular "Testing" page should be a decent resource to point people to when you are telling them "hey this pull request needs a test." Just Android, though, I haven't gotten to the iOS parts yet.

I also disabled a couple tests that seemed quite flaky while running on a local machine, and don't seem to be providing much value. In particular, the `TestId` test just hangs on my emulator a lot and has been flaky on CI in the past, so I removed about half of its test cases to make the sample app smaller. The testMetions test appears to be dependent on screen size so I commented it out.
Closes https://github.com/facebook/react-native/pull/11442

Differential Revision: D4323569

Pulled By: bestander

fbshipit-source-id: 9c869f3915d5c7cee438615f37986b07ab251f8c
2016-12-13 17:13:35 -08:00
Eric Sauter 9dcea13795 Remove docs reference to incorrect align-items default
Summary:
Per https://developer.mozilla.org/en-US/docs/Web/CSS/align-items, the default for `align-items` is stretch, so I removed the reference that suggested otherwise

Similar to https://github.com/facebook/react-native/pull/9397, but this section was not updated in that PR.
Closes https://github.com/facebook/react-native/pull/11373

Differential Revision: D4299871

Pulled By: ericnakagawa

fbshipit-source-id: 1bee27b0dced192ef42e21ca8cc800d52edce195
2016-12-08 10:28:36 -08:00
Andrew Yang dbcfc2b41f Update gradle-download-task from 2.0.0 to 3.1.2 to fix boost zip down…
Summary:
Small pull request

 **motivation**
The doc 'Building React Native from source' is not up to date now.

While i try to build from the source my self, the gradle-download-task(2.0.0) will always fail to download boost zip with a failure of 403.

After i upgrade the gradle-download-task to 3.1.2, the download works well.

**Test plan (required)**
I tested to build the source myself, it works.

This is non-code update, it is document update, hope to help other people who get the same download failure.

**Code formatting**
Non-code update PR.
Closes https://github.com/facebook/react-native/pull/11298

Differential Revision: D4288387

fbshipit-source-id: 5e6feef1ea80f7e3feddcc7e4abf2b5cea82f08f
2016-12-07 16:43:28 -08:00
Eric Vicenti 283d0c07f6 Docs: Revise language around mobile web
Summary:
Addresses some criticism: https://twitter.com/ryanflorence/status/806236197731172352

As the author of this original text, I promise no offense was meant towards mobile web technologies.

I just want to help people build apps that feel great.
Closes https://github.com/facebook/react-native/pull/11353

Differential Revision: D4292705

Pulled By: lacker

fbshipit-source-id: 7b86865e4e98cfc37e052e1c02e0b2c3e800d4fc
2016-12-07 10:43:48 -08:00
Connor Garber 9c0ea77684 Android home path reminder visible twice on linux
Summary:
The line
`Please make sure you export the correct path for 'ANDROID_HOME' if you did not install the Android SDK using Android Studio.`
was visible twice (one on top of another) in the docs when viewing linux instructions. I removed the block that set it visible on both linux and windows and incorporated it into the existing windows block.
Closes https://github.com/facebook/react-native/pull/11276

Differential Revision: D4269783

Pulled By: hramos

fbshipit-source-id: 423fca3219567cf96d91aefc43d1ddabb2403728
2016-12-02 20:43:28 -08:00
Héctor Ramos 964635848b Fix blocks mixed up between mac, linux and windows in Getting Started doc
Summary:
Fixes #11220
Closes https://github.com/facebook/react-native/pull/11229

Differential Revision: D4253097

Pulled By: hramos

fbshipit-source-id: 9821912e25cbf2f3a5a86ea8dc27a85d070af34f
2016-12-01 20:13:28 -08:00
Héctor Ramos c5da1068f8 Update JDK download link for Mac OS Android set up
Summary:
*First PR to React Native.*

After performing a clean install of macOS Sierra on my machine I tried to get RN set up again and noticed that the link provided for installing Java (required by Android Studio) pointed to the [wrong location](https://www.java.com/en/download/mac_download.jsp). After some time researching I found the right package required by Android Studio [here](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).

I tried looking for a more general link (as this points to the JDK version 8 and has a weird path: _jdk8-downloads-2133151.html_ - Sadly this was the best I could find.

I also looked through listed issues to try and find a previous attempt to fix this error but couldn't find any references, sorry if I missed anything.

**TL;DR:** JDK download link is incorrect, PR updates it to the correct one.
Closes https://github.com/facebook/react-native/pull/11201

Differential Revision: D4253304

Pulled By: hramos

fbshipit-source-id: be8ffe059bf60f5d7aa1876e5581b270187864c2
2016-11-30 17:58:34 -08:00
Joel Sánchez 921921237f Add alternative lsof command for killing a process running on port 8081.
Summary:
I was running RN 0.31 on ArchLinux (kernel 4.7), and "react-native start"
was refusing to run on the default (and sometimes required, as I have
noticed) port. I tried executing the suggested lsof command, but that did not
work. Somewhere I found the lsof command I include in this commit, and that
worked (it was a node.js process). So I'm including it, since I found it
helpful.
Closes https://github.com/facebook/react-native/pull/9402

Reviewed By: lacker

Differential Revision: D4144400

Pulled By: hramos

fbshipit-source-id: 6203549455555efc59b7bab0a3ec23957d80b956
2016-11-30 17:13:30 -08:00
Nicolas Cuillery 7d89b773a7 New upgrading process, relying on Git
Summary:
The upgrading process based on Yeoman is a pain. For each file, Yeoman (or the brand new copyAndReplace solution a477aec) compares the newly generated content with the existing one and prompts the user if it differs, with very basic options: overwrite or skip.

I have digged into this problem and came with [rn-diff](https://github.com/ncuillery/rn-diff) (you may have read [this article](https://medium.com/ncuillery/easier-react-native-upgrades-with-rn-diff-5020b5c3de2d#.llvy2dym5)). This repository helps people to upgrade RN on their projects. An alternative upgrading process using `git apply` instead of Yeoman is described [here](https://github.com/ncuillery/rn-diff/blob/master/USAGE.md).

This PR is the integration of this process into the core. I got rid of the drawbacks mentioned in the link below in order to make it a clean, elegant, one-step operation.

This process is based on some Shell operations that:
- Generate the blank sources of both old and new versions
Closes https://github.com/facebook/react-native/pull/11110

Differential Revision: D4237107

Pulled By: mkonicek

fbshipit-source-id: 15e82e030b762415c925ccb2a62ddb354a6e18b9
2016-11-28 08:28:35 -08:00
Sota Yamashtia f520bb9a66 Fix typo
Summary:
This PR for docs.
Closes https://github.com/facebook/react-native/pull/11169

Differential Revision: D4237807

Pulled By: mkonicek

fbshipit-source-id: 39a19081e2cfae1b73102c1bb050fb5328e01d2b
2016-11-28 08:28:35 -08:00
Gant Laborde 5e8e6b8f07 Add CLI basics in docs
Summary:
Adding documentation for the CLI for 2 reasons:

1.  It's not immediately clear to most how the CLI is part of `react-native` and not the node module they installed.  This begins clarifying.
2. I plan on adding some additional documentation to this section pending an upcoming PR I've discussed with Mike.

screen shot provided:
![image](https://cloud.githubusercontent.com/assets/997157/20574213/0640d026-b179-11e6-9bc1-4f507b2a195a.png)
Closes https://github.com/facebook/react-native/pull/11097

Differential Revision: D4237028

Pulled By: mkonicek

fbshipit-source-id: c1dc50fe1be7f6947a33ee6472b5862306888055
2016-11-28 03:28:37 -08:00
Martin Konicek f2684e307c Upgrading - mention peerDependency on React
Summary:
Fixes issues with docs from https://github.com/facebook/react-native/issues/11104.

We should document people should update both `react` and `react-native` until we switch to the new upgrades.
Closes https://github.com/facebook/react-native/pull/11123

Differential Revision: D4236994

Pulled By: bestander

fbshipit-source-id: 3baf5187eda3701f867e6801632b018d7fe0c1ff
2016-11-28 03:13:28 -08:00
George K 74c754de76 Added npm react-native-cli command to windows and linux
Summary:
The windows and linux block didn't have the command to install react-native-cli.

The command is the exact same as it is on macOS. It makes the guide a little confusing because it leaves out this critical step and it's difficult to understand whether or not this needed component was already indirectly installed in one of the other steps.
Closes https://github.com/facebook/react-native/pull/11135

Differential Revision: D4236984

Pulled By: mkonicek

fbshipit-source-id: dca237132df7d80b5a02eaf09faec53e13e005cb
2016-11-28 03:13:28 -08:00
Vojtech Novak 41fac0584a Update Upgrading.md
Summary:
the linked [repo](https://github.com/ncuillery/rn-diff) can help significantly ease the upgrade process.
Closes https://github.com/facebook/react-native/pull/10953

Differential Revision: D4222341

Pulled By: mkonicek

fbshipit-source-id: 5ff4952ecc38f816c404bb56af4d744cf84aef7d
2016-11-22 13:43:32 -08:00
Martin Konicek c038a3839a add more infos on how to profile the javascript #10944
Summary:
As said in #10944, there's not yet some good infos on how to profile the javascript.

I'm adding a mention to two ways of doing it (`react-addons-perf` and chrome profiler), feel free to correct me on this.

I almost added an example for `react-addons-perf` but I'm not sure what's the correct way to use. Here's the way I use it:

```javascript
import Perf from 'react-addons-perf';

....
    componentDidMount() {
        console.log('start perf tracking');
        Perf.start();
        setTimeout(() => {
            console.log('stop perf tracking');
            Perf.stop();
            Perf.printExclusive();
        }, 10000);
   }
...
```
Closes https://github.com/facebook/react-native/pull/10974

Differential Revision: D4221630

Pulled By: mkonicek

fbshipit-source-id: 918f837b9c7169c3dd835e653c78159b801fb946
2016-11-22 12:13:30 -08:00
Abhijit Nukalapati db20b97dfb updating android docs to use the right methods in code snippets
Summary:
- Updating code snippets in the android integration docs which use methods that no longer exist in the [ReactInstanceManager](https://github.com/facebook/react-native/blob/master/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java) class
Closes https://github.com/facebook/react-native/pull/11070

Differential Revision: D4220830

Pulled By: JoelMarcey

fbshipit-source-id: 0dfc49accc27feb42ac31fb50c887736e652ec1b
2016-11-22 11:13:30 -08:00