Commit Graph

1036 Commits

Author SHA1 Message Date
Martin Cerny 715367145f Change name of the file to edit
Summary:
The text that appears on screen is in App.js component.

The project that is being generated using react-native shows `To get started, edit App.js` text when run, but the documentation says to edit index.js file. The text is actually present in App.js, therefore the app is correct, but the documentation is not.

[DOCS] [ENHANCEMENT] [GettingStarted.md] - Wrong name of the file to edit
Closes https://github.com/facebook/react-native/pull/16550

Differential Revision: D6184953

Pulled By: shergin

fbshipit-source-id: c7385a349de8983aff80af8b393b3a973b4ef5cf
2017-10-29 23:02:30 -07:00
Vincent Bernier f134de532a Add missing link to missing podspec
Summary:
Update Integration with Existing Apps
Pod File missing link to podspecs that are not in the master CocoaPods spec repo

Be able to trust documentation when I come back to the page later.

[DOCS][ENHANCEMENT][docs/IntegrationWithExistingApps.md] Add private podspec path to iOS 'Integration with Existing Apps' example.
Closes https://github.com/facebook/react-native/pull/16461

Differential Revision: D6099907

Pulled By: hramos

fbshipit-source-id: f5ca94465355172e9d1df39469b66aa3b6a8624c
2017-10-19 09:46:43 -07:00
Miron Pawlik 74146cb315 Make `react-native link` play nicely with CocoaPods-based iOS projects.
Summary:
The core React Native codebase already has full support for CocoaPods. However, `react-native link` doesn’t play nicely with CocoaPods, so installing third-party libs from the RN ecosystem is really hard.

This change will allow to link projects that contains its own `.podspec` file to CocoaPods-based projects. In case `link` detect `Podfile` in `iOS` directory, it will look for related `.podspec` file in linked project directory, and add it to `Podfile`. If `Podfile` and `.podspec` files are not present, it will fall back to previous implementation.

**Test Plan**
1. Build a React Native project where the iOS part uses CocoaPods to manage its dependencies. The most common scenario here is to have React Native be a Pod dependency, among others.
2. Install a RN-related library, that contains `.podspec` file, with `react-native link` (as an example it could be: [react-native-maps](https://github.com/airbnb/react-native-maps)
3. Building the resulting iOS workspace should succeed (and there should be new entry in `Podfile`)
Closes https://github.com/facebook/react-native/pull/15460

Differential Revision: D6078649

Pulled By: hramos

fbshipit-source-id: 9651085875892fd66299563ca0e42fb2bcc00825
2017-10-17 21:35:47 -07:00
atlanteh f71f8a936b fix typo - missing 'new' keyword
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Fix typo in the documentation - a missing 'new' keyboard

[ DOCS ] [ BUGFIX ] [Animations.md] - Fix typo - missing 'new' keyword
<!--
Help reviewers and the release process by writing your own release notes

**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**

  CATEGORY
[----------]        TYPE
[ CLI      ]   [-------------]      LOCATION
[ DOCS     ]   [ BREAKING    ]   [-------------]
[ GENERAl  ]   [ BUGFIX      ]   [-{Component}-]
[ INTERNAL ]   [ ENHANCEMENT ]   [ {File}      ]
[ IOS      ]   [ FEATURE     ]   [ {Directory} ]   |-----------|
[ ANDROID  ]   [ MINOR       ]   [ {Framework} ] - | {Message} |
[----------]   [-------------]   [-------------]   |-----------|

[CATEGORY] [TYPE] [LOCATION] - MESSAGE

 EXAMPLES:

 [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
 [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
 [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
 [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
 [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
 [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Closes https://github.com/facebook/react-native/pull/16379

Differential Revision: D6067964

Pulled By: hramos

fbshipit-source-id: 8bd47aad252e9baa69cff7f878adfedfd94a5f55
2017-10-16 15:18:41 -07:00
Héctor Ramos Ortiz 5f2c465ecc Add footer links to bot comments, rename label to Good fist issue
Reviewed By: TheSavior

Differential Revision: D6041127

fbshipit-source-id: 02cb7232586815499965257eec3eeb93d4a7f360
2017-10-16 14:17:07 -07:00
Ted de Koning e6ef035887 Android event documentation - Adding part about mapping event names.
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I was quite lost when the documentation told me to go figure the event mapping out myself. It took me quite a while to figure out that i needed to register the names in the `ViewManager`.

This code snippet just makes it way easier to figure out what you need to do to add events.
Closes https://github.com/facebook/react-native/pull/16293

Differential Revision: D6060595

Pulled By: ericnakagawa

fbshipit-source-id: c4755cdb8d99797ff5248ec4eb7e58e2f7ac2588
2017-10-14 17:18:01 -07:00
Héctor Ramos 0266b70379 Remove references to Travis
Summary:
Removing remaining references to Travis, which is removed in #16354.

Test Plan

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

Differential Revision: D6057590

Pulled By: hramos

fbshipit-source-id: 574a5cbbddbc09b48307d70555901b6ab5940e40
2017-10-13 20:34:22 -07:00
Arman Dezfuli-Arjomandi a59d157df4 Update Animated docs to mention potential issues with VirtualizedList
Summary:
Doc update to clarify how to prevent `Animated.loop` and other animations from pre-empting `VirtualizedList` rendering as discussed in #16092.
Closes https://github.com/facebook/react-native/pull/16136

Differential Revision: D6057466

Pulled By: hramos

fbshipit-source-id: 946bcde97b364c623b48ddaeb643309630c072c9
2017-10-13 17:50:17 -07:00
Daniel Mueller e268883fdc Improve support for unbundle feature
Summary:
unbundle is a useful feature, and it should be exposed. In order to get the most use out of
we expose it as an option at build time in the Build Phase on XCode and the project.ext.react
config in the build.gradle.

Because it is best used with inline requires we add a section under performance that describes
how inline requires can be implemented and how to use with the unbundling feature.

Testing:

- Added a section of the doc which explains how the feature can be enabled
- Use the instructions, build a build on iOS + android (using release so that the bundle is created) and confirm that the bundle has the binary header information.
Closes https://github.com/facebook/react-native/pull/15317

Differential Revision: D6054642

Pulled By: hramos

fbshipit-source-id: 067f4d2f78d91215709bd3e3636f460bc2b17e99
2017-10-13 17:28:28 -07:00
Paito Anderson 4a2d3e9653 Fixed homogenous typo
Summary: Closes https://github.com/facebook/react-native/pull/16285

Differential Revision: D6048989

Pulled By: hramos

fbshipit-source-id: e6affb221961d14827ff655069571a3dc57197a1
2017-10-13 00:15:42 -07:00
linh-le 7c89cf37c6 Change attribute mentioned in alignItem
Summary:
Since alignItem works on the secondary axis, in the example, the value heigth: 50 should be deleted so that alignItem: 'stretch' can work. Not width: 50. In fact, width needs to be there, or else no component will be shown at all.

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

(Write your motivation here.)

I'm going through the docs, that's why I found this. It's already tested!

Apologize if I'm contributing the wrong way. I read the instructions, but this is my first time ever, and will try to do it again correctly if needed.
Closes https://github.com/facebook/react-native/pull/16109

Differential Revision: D6017969

Pulled By: shergin

fbshipit-source-id: af37b831f1bb6206dabdaff36d4cb9e88fb1a496
2017-10-09 22:02:09 -07:00
Steffen Forkmann b9da155fd8 Document adb shell input keyevent 82
Summary:
This information could be found already in older docs see https://facebook.github.io/react-native/releases/0.21/docs/running-on-device-android.html#accessing-development-server-from-device. It is missing from latest.

I think it's important alternative since shaking my device all the time borked my USB port
Closes https://github.com/facebook/react-native/pull/16241

Differential Revision: D6017905

Pulled By: shergin

fbshipit-source-id: 9426b4068a6bc60aed50f85b2f596d0494def52a
2017-10-09 22:02:09 -07:00
esbenvb 3eced7faba Updated swift section to match current code base
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

Current documentation was outdated.

Follow the swift section with a recent version of RN and see that it works?
Closes https://github.com/facebook/react-native/pull/16260

Differential Revision: D6017759

Pulled By: hramos

fbshipit-source-id: 5d3ea56b08427694016c39b7ace5b2d5c63c1f4c
2017-10-09 21:01:31 -07:00
Gabriel Weyer c12681c214 Fix warning on SectionList's tutorial
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I wanted to fix issue #16231 - the warning is not displayed anymore:

![image](https://user-images.githubusercontent.com/2101647/31268083-7e2e0ddc-aac6-11e7-966b-b1e9ffa6cfa8.png)
Closes https://github.com/facebook/react-native/pull/16232

Differential Revision: D6005386

Pulled By: hramos

fbshipit-source-id: 33961ee7cd708c424c2665a38dc5e733f1ea2204
2017-10-07 16:40:43 -07:00
Paulo Ricardo Severo 2f2c3ea254 Fix navigation links in documentation.
Summary:
When navigating in the docs, these two links are broken.

The "Continue Reading" in http://facebook.github.io/react-native/docs/more-resources.html page, and "Previous" in http://facebook.github.io/react-native/docs/platform-specific-code.html.

This PR is to fix this.
Closes https://github.com/facebook/react-native/pull/16236

Differential Revision: D5998970

Pulled By: hramos

fbshipit-source-id: b339408eaada612133f6b63bd11967196ff3a039
2017-10-06 13:08:57 -07:00
Gustavo Gard 2d2dfa26bc Correct logo URL
Summary:
Update logo URL
https://facebook.github.io/react/img/logo_og.png (old) to https://facebook.github.io/react/logo-og.png (new)

Check that the old URL shows a "Page Not Found" and the new URL the correct image.
Closes https://github.com/facebook/react-native/pull/16204

Differential Revision: D5978967

Pulled By: TheSavior

fbshipit-source-id: f6af03dfd25d68c96e01054c256d8b6ba9fedba2
2017-10-04 14:38:02 -07:00
Suhair Zain d0260b4f35 Documentation about ABI split in Android Release
Summary:
It leads to a reduction of 5-7MB for an app, which is a considerable saving when it comes to emerging markets. Also, I had written a [comment](https://github.com/facebook/react-native/issues/5037#issuecomment-223758335) on an issue which seems to have helped at least 26 people.
Closes https://github.com/facebook/react-native/pull/16197

Differential Revision: D5978945

Pulled By: TheSavior

fbshipit-source-id: 391a992e2d8e62e59fb20e5d5f8e5f59c00b6295
2017-10-04 14:17:03 -07:00
Indrek Lasn e1fb6fffb6 Modernize docs: remove 'use strict' from docs -- es6 has 'use strict' by default
Summary:
Removed <b>'use strict'</b> from docs since ES6 Modules already use <b>'use strict'</b>  by default.

https://stackoverflow.com/questions/31685262/not-recommended-to-use-use-strict-in-es6

> 10.2.1 Strict Mode Code

> An ECMAScript Script syntactic unit may be processed using either unrestricted or strict mode syntax and semantics. Code is interpreted as strict mode code in the following situations:

> Global code is strict mode code if it begins with a Directive Prologue that contains a Use Strict Directive (see 14.1.1).
Module code is always strict mode code.
All parts of a ClassDeclaration or a ClassExpression are strict mode code.
Eval code is strict mode code if it begins with a Directive Prologue that contains a Use Strict Directive or if the call to eval is a direct eval (see 12.3.4.1) that is contained in strict mode code.
Function code is strict mode code if the associated FunctionDeclaration, FunctionExpression, GeneratorDeclaration, GeneratorExpression, MethodDefinition, or ArrowFunction is contained in strict mode code or if the code that produces the value of the function’s [[ECMAScriptCode]] internal slot begins with a Directive Prologue that contains a Use Strict Directive.
Function code that is supplied as the arguments to the built-in Function and Generator constructors is strict mode code if the last argument is a String that when processed is a FunctionBody that begins with a Directive Prologue that contains a Use Strict Directive.

Spec: http://www.ecma-international.org/ecma-262/6.0/#sec-strict-mode-code
Closes https://github.com/facebook/react-native/pull/16163

Differential Revision: D5968746

Pulled By: hramos

fbshipit-source-id: 308f49184b1565311d5fd71786639eaee13be60a
2017-10-03 17:17:12 -07:00
ivanpdigitalalchemist 235c8874cc missing parentheses in example code
Summary:
in the example code for configuring animations, Easing.back should be Easing.back()

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15273

Differential Revision: D5929874

Pulled By: shergin

fbshipit-source-id: 89921d0dda899e1697ee1fa5d96752964a2dc3f9
2017-09-27 21:30:17 -07:00
Flavio Li Volsi f25233b15f Update HeadlessJSAndroid.md explaining parameters
Summary:
HeadlessJsTaskConfig parameters can be unclear, so I added one more parameter that was left set by default and the respective comments.
Closes https://github.com/facebook/react-native/pull/16054

Differential Revision: D5881373

Pulled By: hramos

fbshipit-source-id: 3d271f73921417d82e3a2c7a1aaabe92aef7ec69
2017-09-21 08:51:00 -07:00
Christian Brevik f426a83d1b Add props for overriding native component
Summary:
Opening a new PR for #10946 (see discussion there).

This PR builds upon #14775 (iOS ViewManager inheritance) and #14261 (more extensible Android WebView).

**Motivation**
When `WebView.android.js` and `WebView.ios.js` use `requireNativeComponent`, they are hard-coded to require `RCTWebView`. This means if you want to re-use the same JS-logic, but require a custom native WebView-implementation, you have to duplicate the entire JS-code files.

The same is true if you want to pass through any custom events or props, which you want to set on the custom native `WebView`.

What I'm trying to solve with this PR is to able to extend native WebView logic, and being able to re-use and extend existing WebView JS-logic.

This is done by adding a new `nativeConfig` prop on WebView. I've also moved the  extra `requireNativeComponent` config to `WebView.extraNativeComponentConfig` for easier re-use.

**Test plan**
jacobp100 has been kind enough to help me with docs for this new feature. So that is part of the PR and can be read for some information.

I've also created an example app which demonstrates how to use this functionality: https://github.com/cbrevik/webview-native-config-example

If you've implemented the native side as in the example repo above, it should be fairly easy to use from JavaScript like this:
```javascript
import React, { Component, PropTypes } from 'react';
import { WebView, requireNativeComponent, NativeModules } from 'react-native';
const { CustomWebViewManager } = NativeModules;

export default class CustomWebView extends Component {
  static propTypes = {
    ...WebView.propTypes,
    finalUrl: PropTypes.string,
    onNavigationCompleted: PropTypes.func,
  };

  _onNavigationCompleted = (event) => {
    const { onNavigationCompleted } = this.props;
    onNavigationCompleted && onNavigationCompleted(event);
  }

  render() {
    return (
      <WebView
        {...this.props}
        nativeConfig={{
          component: RCTCustomWebView,
          props: {
            finalUrl: this.props.finalUrl,
            onNavigationCompleted: this._onNavigationCompleted,
          },
          viewManager: CustomWebViewManager
        }}
      />
    );
  }
}

const RCTCustomWebView = requireNativeComponent(
  'RCTCustomWebView',
  CustomWebView,
  WebView.extraNativeComponentConfig
);
```

As you see, you require the custom native implementation at the bottom, and send in that along with any custom props with the `nativeConfig` prop on the `WebView`. You also send in the `viewManager` since iOS requires that for `startLoadWithResult`.

**Discussion**
As noted in the original PR, this could in principle be done with more React Native components, to make it easier for the community to re-use and extend native components.
Closes https://github.com/facebook/react-native/pull/15016

Differential Revision: D5701280

Pulled By: hramos

fbshipit-source-id: 6c3702654339b037ee81d190c623b8857550e972
2017-09-19 16:01:02 -07:00
Drew Smith c25a3db662 Revert faulty change to HelloWorld demo in docs
Summary:
Related to commit/diff:
6e99e314b2 (diff-692279cda23c48738b9688454811448a)

The above change breaks "HelloWorld" demo in docs, as you can see at the bottom of the below screenshot:
![image](https://user-images.githubusercontent.com/5363847/30427914-9477d4ee-9949-11e7-8be6-3d6990d6e267.png)

This pull request reverts things just enough to get the demo working correctly again.

I'm new to react-native so I'm not sure if there is another (read: better) solution but by accepting this pull request it would prevent noobs like myself from falling at the first hurdle!
Closes https://github.com/facebook/react-native/pull/15947

Differential Revision: D5866110

Pulled By: hramos

fbshipit-source-id: a453e4373b8af528e3ef2fa6a5a029ff398b0398
2017-09-19 15:46:14 -07:00
Chris Lewis a43a988128 Document Android native communication
Summary:
Native communication is documented for iOS but not Android. Typically pages in Guides (IOS) and Guides (Android) share a common structure/content but provide language specific examples.

I followed this pattern with the Android native communication documentation. It is missing some content that the iOS documentation contains, such as the layout computation flow. But provides a solid base for future efforts.

Ran local instance of React Native website. Went to http://localhost:8079 and read through the new page (react-native/docs/communication-android.html). Also tested links two/from the page.

As a result of this link testing, I updated the Native Modules Android documentation to link to the Apple TV documentation, as it is now the previous page on the navigation sidebar.
Closes https://github.com/facebook/react-native/pull/14316

Differential Revision: D5865137

Pulled By: hramos

fbshipit-source-id: 10ec7d2b08667e70bc38576ecc56da457859e8b1
2017-09-19 14:16:41 -07:00
Ian Hill 3ceb20de74 Minor documentation correction for exposing native iOS components
Summary:
Minor documentation correction for the native components iOS API section.

Before: "Sometimes your native component will have some special properties that you don't want to them to be part of the API"

After: "Sometimes your native component will have some special properties that you don't want to be part of the API"

Confirm section renders correctly via markdown.
Closes https://github.com/facebook/react-native/pull/15914

Reviewed By: TheSavior

Differential Revision: D5817146

Pulled By: buymeasoda

fbshipit-source-id: 075441cf7f5f23a4ca512bae48ca8fc319762b1e
2017-09-12 13:51:55 -07:00
ubatin 1e8f3b1102 Update SignedAPKAndroid.md
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->
Add another keystore's settings path.

`+ or android/gradle.properties`
Closes https://github.com/facebook/react-native/pull/15846

Differential Revision: D5785326

Pulled By: hramos

fbshipit-source-id: 5bc2acbd53c7ce7fe4e866b8855c3ca8cd4d60dd
2017-09-07 10:00:22 -07:00
GingerBear 75850b9014 Update Android Guide for Integration With Existing Apps
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I was trying to follow the instruction on http://facebook.github.io/react-native/docs/integration-with-existing-apps.html to integrate react native into existing android app, but failed. After hours of google/stackoverflow, I finally get it running. I am submitting this pr the list the diffs in the guide so that other developer won't fell into the same issues.

- create an example android project
- follow the guide in the pr to integrate react-native into the example android project
- make sure it runs without error
Closes https://github.com/facebook/react-native/pull/15813

Differential Revision: D5767573

Pulled By: hramos

fbshipit-source-id: 805165a64b6db2aa2de936ad8f6a8a3d2fedd7c4
2017-09-05 11:01:40 -07:00
Hector Ramos 5b79ee6808 Move tabbing logic back to individual docs
Summary:
In preparation for an upcoming website update, we need to host the tabbing logic used by Getting Started, Integration with Existing Apps, and Running on Device, in the individual documents themselves.

The website update will allow us to use actual React components to implement this behavior. When the website update is live, we can work on the React alternative.

Ran website, verified tabbing worked as expected in all three documents.
Closes https://github.com/facebook/react-native/pull/15758

Differential Revision: D5758202

Pulled By: hramos

fbshipit-source-id: bd00c6c2ac9377b4427022b30ca7ed7787eb3a86
2017-09-01 18:06:24 -07:00
Pavol Fulop 8b9df81c27 Provide example of android side implementation of HeadlessJS
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x] Explain the **motivation** for making this change.
- [ ] Provide a **test plan** demonstrating that the code is solid.
- [ ] Match the **code formatting** of the rest of the codebase.
- [ ] Target the `master` branch, NOT a "stable" branch.

The existing documentation on this topic doesn't provide enough of detail on where to start a headlessJS task.

Just docs change

This PR extends HeadlessJS documentation to show an example on how to start HeadlessJsTaskService. Sample code in example reacts to connectivity change using custom broadcast receiver logic that bundles additional information and starts the aforementioned service.
Closes https://github.com/facebook/react-native/pull/13957

Differential Revision: D5746809

Pulled By: hramos

fbshipit-source-id: 3eeea7d4a71382acf4b6f7ad1b99d20e2745c558
2017-08-31 11:19:34 -07:00
Hector Ramos 26ef0b0f33 Add Troubleshooting Guide to Sidebar.
Summary:
Doing this will make it easier for us to migrate docs to the new site.
Closes https://github.com/facebook/react-native/pull/15658

Differential Revision: D5710584

Pulled By: hramos

fbshipit-source-id: 021ed1cd71b77de05deebdc8045e5e409071c95f
2017-08-25 15:30:43 -07:00
Adam Comella b050b6906d BREAKING: iOS: Fix case sensitivity build warning in Xcode 8.3
Summary:
**Breaking Change Notes**

To adapt to the breaking change, app developers that are consuming React Native through CocoaPods must update their Podfile to refer to yoga with a lowercase "y". In other words:

    pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

Must be changed to (note the lowercase "y"):

    pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

**Symptom**

If you consume React Native as a CocoaPod and consume a third-party React Native module not as a CocoaPod, you will receive a `nonportable-include-path` warning in Xcode >= 8.3.

**Details**

Xcode 8.3 introduced -Wnonportable-include-path which triggers if you import a header using different casing than the path to the header on disk. This triggers when consuming React Native as a CocoaPod from a library that isn't a CocoaPod. React Native imports Yoga using paths like this:

    #import <yoga/Yoga.h>

Which means Yoga's headers are expected to be located in a directory called "yoga" with a lowercase "y". However, when React Native is a CocoaPod the Yoga headers for non-CocoaPods end up in the directory "$(BUILT_PRODUCTS_DIR)/Yoga".

To fix this such that Yoga's headers end up in "$(BUILT_PRODUCTS_DIR)/yoga" (note the lowercase "y"), I've changed Yoga's podspec name to have a lowercase "y".

**Test Plan**

Created a test app where React Native is consumed as a CocoaPod. Added the react-native-maps library to the project and configured it to not be consumed through CocoaPods. Verified that the app compiles properly without the `nonportable-include-path` warnings.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/15527

Differential Revision: D5706338

Pulled By: javache

fbshipit-source-id: 090daa2c3ebb1c66bd467e78a1e91791dbb06651
2017-08-25 04:45:06 -07:00
Alexander Kotliarskyi 4908e395c2 New guide: Improving User Experience
Summary:
Work in progress for #14979

![image](https://user-images.githubusercontent.com/192222/28240809-efe8613c-693c-11e7-86e5-10dff490a686.png)
Closes https://github.com/facebook/react-native/pull/14993

Reviewed By: hramos

Differential Revision: D5700652

Pulled By: frantic

fbshipit-source-id: e4130723fa8ada2211f9559e5d84d81f29f9fd2a
2017-08-24 14:01:53 -07:00
S.M.A. Javadi a777517651 Update GettingStarted.md
Summary:
fix a typo on linux keyboark ( Use `ctrl` instead of `command` )
Closes https://github.com/facebook/react-native/pull/15565

Differential Revision: D5666988

Pulled By: TheSavior

fbshipit-source-id: 3e796f4e155c6c76ce1b7c0f2b473a8f64e1d0bd
2017-08-19 15:17:43 -07:00
Radek Czemerys 2292023a1b Link to main Android NDK website
Summary:
It's probably better to link to main NDK page than downloads section.
Closes https://github.com/facebook/react-native/pull/13764

Differential Revision: D5661133

Pulled By: hramos

fbshipit-source-id: 18a54cada38bb894f2535e26b218818a854d699f
2017-08-18 13:29:31 -07:00
Petr Bela cdf1b0e5d5 Note about flex
Summary:
Hopefully, this will save an hour of WTFs for the next reader.
Closes https://github.com/facebook/react-native/pull/14876

Differential Revision: D5385881

Pulled By: hramos

fbshipit-source-id: 56961e8a5eb3b6fae4f92c7fb9fea1e1147a3521
2017-08-16 23:44:50 -07:00
Héctor Ramos 2c076cdbdf Flag large pull requests, add large-pr command
Summary:
We sometimes get large PRs that sit for a long time without being reviewed. In some cases, the PR touches too many files or lines, and the author would benefit from splitting the PR into smaller easier-to-review PRs. In this PR, we automatically flag such PRs using the existing Danger PR automation functionality.

This PR achieves the objective by doing the following:

* Add facebook-open-source-bot to `IssueCommands.txt`, allowing it to add labels and close issues/PRs via facebook-github-bot commands.
* Adds a `large-pr` command to facebook-github-bot. This command will add a short blurb, apply a new "Large PR" label, and close the PR.
* Updates the Dangerfile to check for PRs that touch over 600 lines and/or files. In such cases it will warn and then issue the large-pr command.

Additional changes:

* Tag core contributor PRs with the "Core Team" label. This is a slight change in policy, in that the label used to be applied after the fact (after the PR was escalated for review). It's more convenient to monitor labels, so we'll start checking for PRs tagged as such and ensure they get escalated as needed. cc skevy

Thanks to TheSavior for suggesting this change.

Testing against PR #10084 which touches over 600 lines:

```
$ cd danger
$ DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" npm run danger pr https://github.com/facebook/react-native/pull/10084

> @ danger /Users/hramos/git/react-native/danger
> node ./node_modules/.bin/danger "pr" "https://github.com/facebook/react-native/pull/10084"

{
  fails: [],
  warnings: [
    {
      message: "📋 Test Plan - <i>This PR appears to be missing a Test Plan.</i>"
    },
    {
      message: " Big PR - <i>This PR is extremely unlikely to get reviewed because it touches 613 lines.</i>"
    }
  ],
  messages: [],
  markdowns: ["facebook-github-bot label Needs more information", "facebook-github-bot large-pr"]
}
```

Result: successfully flagged as being a large PR.
Closes https://github.com/facebook/react-native/pull/15519

Differential Revision: D5647085

Pulled By: hramos

fbshipit-source-id: dfa0f6580b9373085eba856de257a8d2452efbdc
2017-08-16 21:00:44 -07:00
George Jose 381f738107 Updated troubleshooting - changing port section
Summary:
Thanks for submitting a PR! Please read these instructions carefully:

- [x ] Explain the **motivation** for making this change.
- [x ] Provide a **test plan** demonstrating that the code is solid.
- [x ] Match the **code formatting** of the rest of the codebase.
- [x ] Target the `master` branch, NOT a "stable" branch.

The section on changing ports is missing a key step for folks wishing to run on device

What existing problem does the pull request solve?

Changing packager port to something other than 8081 also requires the react native xcode project file to be updated in order to be able to build and run on device. The section on changing ports currently does not address this. See https://github.com/facebook/react-native/issues/10715#issuecomment-258082512.

Documentation update, no tests required.

A good test plan has the exact commands you ran and their output, provides screenshots or videos if the pull request changes UI or updates the website. See [What is a Test Plan?][1] to learn more.

If you have added code that should be tested, add tests.

Sign the [CLA][2], if you haven't already.

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

Make sure all **tests pass** on both [Travis][3] and [Circle CI][4]. PRs that break tests are unlikely to be merged.

For more info, see the ["Pull Requests"][5] section of our "Contributing" guidelines.

[1]: https://medium.com/martinkonicek/what-is-a-test-plan-8bfc840ec171#.y9lcuqqi9
[2]: https://code.facebook.com/cla
[3]: https://travis-ci.org/facebook/react-native
[4]: http://circleci.com/gh/facebook/react-native
[5]: https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md#pull-requests
Closes https://github.com/facebook/react-native/pull/14293

Differential Revision: D5647393

Pulled By: hramos

fbshipit-source-id: 040c3edea7d25c0efe560d5df30e86e1f26355bc
2017-08-16 19:47:20 -07:00
Kathy Gray 5d4c6e5f23 Rename module name to module path
Reviewed By: javache

Differential Revision: D5592950

fbshipit-source-id: 7e32043ba6d1de129a4f8dc694bb5987393b0ebc
2017-08-10 09:19:20 -07:00
Douglas Lowder 0e7375ae36 Apple TV: RCTTabBar selection controlled by native after render (fix #15081)
Summary:
**Motivation**

Fix flickering in TabBarIOS on Apple TV... issue #15081

After this change, on Apple TV, TabBarIOS item selections will be controlled purely from the native side after initial render with the `selected` prop.  This is necessary because the `UITabBar` implementation in tvOS moves the selection before calling `shouldSelectViewController:`; this issue does not occur on iOS.

**Test plan**

Existing CI should still pass. Issue is resolved when testing the example code in #15081 .
Closes https://github.com/facebook/react-native/pull/15220

Differential Revision: D5601671

Pulled By: javache

fbshipit-source-id: c18e7d3482d6c07d534ff40a443a6f642d4267bb
2017-08-10 05:36:06 -07:00
Mark 9075ff6b05 Fix typo
Summary:
<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to React Native here: http://facebook.github.io/react-native/docs/contributing.html

Happy contributing!

-->

I saw a word missing; I just wanted to correct the typo.

No testing needed for a typo in the documentation
Closes https://github.com/facebook/react-native/pull/15393

Differential Revision: D5601466

Pulled By: javache

fbshipit-source-id: 7cfb6ba957ac4053fd8645af419a7be2361c6c75
2017-08-10 03:21:07 -07:00
Kyle Decot f17b130c9c Fixes bad link in docs
Summary:
Fixes link in `IntegrationWithExistingApps.md`.
Closes https://github.com/facebook/react-native/pull/15435

Differential Revision: D5600616

Pulled By: shergin

fbshipit-source-id: 64ff5c9e6956274adf2b832b2c71b5092eed26ae
2017-08-09 21:52:30 -07:00
Gant Laborde 2161f92aaf Add pertinent info for fresh flatlisters
Summary:
I just worked with a fellow dev who was switching to flatlist and ended up pretty surprised at the performance drop.  The measurement had an exponential bridge saturation, causing flatlist to lose to a scrollview!

We knew something was up, but a little note in the docs would have helped.
Closes https://github.com/facebook/react-native/pull/15400

Differential Revision: D5579483

Pulled By: sahrens

fbshipit-source-id: 2cc2488b6332db4f4d644c67f180088d3a5874a8
2017-08-07 17:58:42 -07:00
lgvichy@gmail.com c5bd033e4b Add proper Stetho debugging setup documentation
Summary:
Adding the proper way to setup Stetho debugging, based on this post: https://medium.com/andr3wjack/stetho-with-react-native-87642e5d7131#.352jqqavc

with updated OkHttp API.

**Test plan**

 + Manual test, DYI.
Closes https://github.com/facebook/react-native/pull/12232

Differential Revision: D5568733

Pulled By: hramos

fbshipit-source-id: 6006b9daa48024742b948f5fd33a07545549397c
2017-08-04 16:47:00 -07:00
Hector Ramos 5be8c4af26 Cleanup stray markdown files, update contributing guidelines
Summary:
Several changes here. The `Text.md` and `PixelRatio.md` files were appended to the autodocs during site generation. This seemed excessive for just two files, so I've just merged the content into the autodocs themselves. It should help us simplify the website generation process in the future.

I've also merged IssueGuidelines.md and PullRequestGuidelines.md into the Contribution/Maintainers guidelines to improve their visibility.

Finally, I renamed Help to Community in the nav bar.

Ran the website locally, and verified every page rendered as expected: the Community page, Contributing page, Maintainers page.
Closes https://github.com/facebook/react-native/pull/15374

Differential Revision: D5567400

Pulled By: hramos

fbshipit-source-id: e06056edb12c9a17319fe1af46b2ef3a2e1b5854
2017-08-04 16:18:01 -07:00
Evan Jones 6bcc56e251 Adding documentation to useNativeDriver portion of the Animated API
Summary:
What existing problem does the pull request solve?

Ensure users of the React Native platform are aware of transform properties they must have while using `useNativeDriver` with the Animated API.

Not applicable.

I've been messing around with this for a couple of days at this point and feel a bit silly. See this issue [here](https://github.com/facebook/react-native/issues/13522). This would have saved me some time and will likely save others time as well.

Thank you for taking the time to look over this PR. Cheers!
Closes https://github.com/facebook/react-native/pull/13524

Differential Revision: D5567584

Pulled By: hramos

fbshipit-source-id: 4be9f1ba0f21148106f596efb0be791d4d364a66
2017-08-04 15:41:01 -07:00
Vojtech Novak 23236952b3 fix typo
Summary:
properties that has been set before -> properties that have been set before
Closes https://github.com/facebook/react-native/pull/15370

Differential Revision: D5563802

Pulled By: hramos

fbshipit-source-id: 288032555308a7e89ac365ff091b01ca381d4c80
2017-08-04 11:05:02 -07:00
Martin Raedlinger fb371af32d troubleshooting docs (clone #14885)
Summary:
I added troubleshooting docs for connection to the development server from device, otherwise it's maybe hard to find out why it's not working.

Due to a disparity in what GitHub's API return the original PR (https://github.com/facebook/react-native/pull/14885) couldn't get imported, so I created a new PR as hramos suggested.
Closes https://github.com/facebook/react-native/pull/15304

Differential Revision: D5537615

Pulled By: hramos

fbshipit-source-id: b94e887b1b771be9e93854124bd0a56b27fd0097
2017-08-04 09:50:02 -07:00
Ville Immonen 6e99e314b2 Move HelloWorld template to a single index.js entry point
Summary:
This change (initially discussed in https://github.com/react-community/create-react-native-app/issues/26) moves the HelloWorld project template from two nearly identical entry points (`index.android.js` and `index.ios.js`) to a single, minimal `index.js` entry point. The root component is created in `App.js`. This unifies the project structure between `react-native init` and Create React Native App and allows CRNA's eject to use the entry point from the HelloWorld template without any hacks to customize it. Also examples in the docs can be just copy-pasted to `App.js` the same way in both HelloWorld and CRNA apps without having to first learn about  `AppRegistry.registerComponent`.

* Created a new project from the template using `./scripts/test-manual-e2e.sh` and verified that:
  * The app builds, starts and runs both on Android and iOS.
  * Editing and reloading changes works.
  * The new files (`index.js`, `App.js`, `__tests__/App.js`) get created in the project folder.

<img width="559" alt="screen shot 2017-08-01 at 19 10 51" src="https://user-images.githubusercontent.com/497214/28835171-300a12b6-76ed-11e7-81b2-623639c3b8f6.png">
<img width="467" alt="screen shot 2017-08-01 at 19 09 12" src="https://user-images.githubusercontent.com/497214/28835180-33d285e0-76ed-11e7-8d68-2b3bc44bf585.png">

<!--
Thank you for sending the PR!

If you changed any code, please provide us with clear instructions on how you verified your changes work. In other words, a test plan is *required*. Bonus points for screenshots and videos!

Please read the Contribution Guidelines at https://github.com/facebook/react-native/blob/master/CONTRIBUTING.md to learn more about contributing to React Native.

Happy contributing!
-->
Closes https://github.com/facebook/react-native/pull/15312

Differential Revision: D5556276

Pulled By: hramos

fbshipit-source-id: 068fdf7e51381c2bc50321522f2be0db47296c5e
2017-08-03 14:02:43 -07:00
Vojtech Novak 1de9a35f14 document how to export consts from a swift native module
Summary:
I documented how to export consts from a swift native module.
Closes https://github.com/facebook/react-native/pull/15340

Differential Revision: D5556264

Pulled By: hramos

fbshipit-source-id: 0374f1c291e3c15424c8e53fef7ab30c60643165
2017-08-03 13:13:25 -07:00
Finian 4a8ad10b4d Docs: fix typo
Summary:
Fix typo in NativeModulesIOS.md doc
Closes https://github.com/facebook/react-native/pull/15306

Differential Revision: D5536657

Pulled By: javache

fbshipit-source-id: da8d183ef97995baa3b44595ff63ca3b1ced6b4e
2017-08-02 03:12:44 -07:00
Douglas Lowder 75284d3cd4 Apple TV: Enable long presses on TV remote; dev menu on TV device; example code
Summary:
**Motivation**

Properly support long presses on the Apple TV remote, and also enable dev menu functionality on a real Apple TV device (shaking an Apple TV doesn't work 😄 )

**Test plan**

New example added to `RNTester`.
Closes https://github.com/facebook/react-native/pull/15221

Differential Revision: D5526463

Pulled By: javache

fbshipit-source-id: a61051e86bc82a9561eefc1704bed6b1f2617e05
2017-07-31 04:06:32 -07:00