Commit Graph

1053 Commits

Author SHA1 Message Date
Harikrishnan P 95dac8db60 Updated broken link.
Summary:
The URL http://makeitopen.com/tutorials/building-the-f8-app/planning/ is 404. Updated with correct URL.

<!--
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.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

<!--
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/16976

Differential Revision: D6472303

Pulled By: shergin

fbshipit-source-id: 65c829384b4c9c3468c1c73aa10c8e6aa0164d05
2017-12-03 20:46:04 -08:00
Dennis Sandmark 94cd9f5591 Update native-modules-android.md
Summary:
`import com.facebook.react.bridge.Callback;` is needed to be able to use `Callback` as a parameter.

<!--
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!

-->

Thought it needed to be clearer that you need to import `Callback` as it's not a native Java type.

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

<!--
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/17015

Differential Revision: D6464454

Pulled By: hramos

fbshipit-source-id: dfb57f4176483c4e95539c5db03a86f01892e587
2017-12-01 15:46:23 -08:00
Christoph Nakazawa 654fed46f4 Rename metro-bundler to metro
Reviewed By: davidaurelio

Differential Revision: D6413420

fbshipit-source-id: f13184b8157de2c3aeaa7f2647becc175f62cdbb
2017-11-29 03:35:29 -08:00
Lorenzo Sciandra 92c0980540 Update Performance.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!

-->

Removing the `react-addons-perf` reference since now RN relies on React 16, and it's not [supported anymore](https://reactjs.org/docs/perf.html).

Nothing to test.

[DOCS] [BUGFIX] [Performance.md] removing old reference in the doc.
<!--
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/17004

Differential Revision: D6434107

Pulled By: hramos

fbshipit-source-id: 7080c8054072ffb3e2ea58dcb89997585a5d5833
2017-11-28 21:46:48 -08:00
Héctor Ramos 75123c614b Remove empty lines to ensure JavaScript is loaded
Summary:
This is not currently an issue within the current site infrastructure, but eliminating these empty lines will ensure the code is not parsed as plain markdown text by some libraries.
Closes https://github.com/facebook/react-native/pull/16917

Differential Revision: D6389212

Pulled By: hramos

fbshipit-source-id: 853ace6f31c32abee36b563198ec79ca3c55176f
2017-11-21 14:27:06 -08:00
Jesús Darío 60828566a7 Add a sample to clarify animation callback
Summary:
Even having worked long with React Native, I am pretty new to animations, so it took me a while to figure out how to trigger some code after an animation had finished. After some investigation, it
was evident I did not ready as in depth as I am supposed to, but this can be a problem for many
who, like me, try to search quick through docs and other resources.

Here more cases:
https://stackoverflow.com/questions/38053071/react-native-animated-complete-event
https://github.com/facebook/react-native/issues/3212

Read the proposed sample, and see if it is adequate.

 [DOCS] [ENHANCEMENT] [AnimatedImplementation.js] - Adds a sample for animation callbacks
Closes https://github.com/facebook/react-native/pull/16770

Differential Revision: D6304441

Pulled By: hramos

fbshipit-source-id: c22e391aece6a62684a78847fc74df203c2438d7
2017-11-21 11:02:57 -08:00
Héctor Ramos 3c9092acf3 Fix Shadow Props
Summary:
Quick fix
Closes https://github.com/facebook/react-native/pull/16910

Differential Revision: D6385891

Pulled By: hramos

fbshipit-source-id: 5fcb0674db14282ccac5aa26518a84888a5e3005
2017-11-21 10:18:29 -08:00
Héctor Ramos 79e24ede40 Migrate additional docs to the new format
Summary:
[DOCS]
Closes https://github.com/facebook/react-native/pull/16874

Differential Revision: D6375515

Pulled By: hramos

fbshipit-source-id: 64359b45a37c7b478919121573ca04dbb1ce6609
2017-11-20 13:16:12 -08:00
John Wilson 6b26971a56 Removed Duplicate data.
Summary:
Prop for SectionList 'ItemSeperatorComponent' was repeated twice.

<!--
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.)

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

<!--
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/16872

Differential Revision: D6370787

Pulled By: hramos

fbshipit-source-id: f5b53376b6c169d96089e8706612587cc50d8669
2017-11-19 09:57:06 -08:00
John Wilson 3aa38564f7 Correcting the redirection link.
Summary:
Correcting the redirection link to the right section ID for ListFooterComponent.

<!--
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!

-->

(Making the site flow better.)

(Just fixed a small typo!)

<!--
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/16873

Differential Revision: D6370785

Pulled By: hramos

fbshipit-source-id: bb6e5ca4e9bb585f94670c233258d602136e3097
2017-11-19 09:30:48 -08:00
Héctor Ramos 64d80b13db Migrate to new documentation format
Summary:
Now that the Component and API docs are no longer auto-generated, we need to consolidate on a new format for our jsdoc comments. Any help from the community will be appreciated.

In this initial pull request, we'll be tackling the following docs:

- `AccessibilityInfo`, an API doc.
- `ActivityIndicator`, a Component doc.
- `View`, a Component doc.

This top comment will serve as a style guide, and when in doubt, please refer to the individual commits in this PR.

Each commit should update a single component or API, along with any relevant markdown files.

- Documentation in the JavaScript source files should be succinct. Any verbosity should be moved over to the markdown docs in the website...
- ...by adding a link to the relevant method/prop on the website to every comment block.
- Avoid markdown style links in JavaScript source files, opt for plain old URIs.

Let code document itself:

- If a method is Flow typed, the comment block does not need to repeat this information.
- If a param can be one of several values, and the type definition is easily determined from the code, the values should not be repeated in the comment block. Again, move this to the markdown doc if not present already.
Closes https://github.com/facebook/react-native/pull/16790

Differential Revision: D6353840

Pulled By: hramos

fbshipit-source-id: 9712c459acc33092aae9909f3dd0b58a00b26afc
2017-11-16 17:04:45 -08:00
Héctor Ramos e5a4ea97d9 Restore missing ejected banner
Summary:
A few more docs where the ejected metadata was lost in the autodocs flattening transition that happened in 9ec9567390.
Closes https://github.com/facebook/react-native/pull/16773

Differential Revision: D6286368

Pulled By: hramos

fbshipit-source-id: bb7c032ca386e473c393821ce031714168d31719
2017-11-09 11:10:50 -08:00
Héctor Ramos e11d496e9d Additional markdown adjustments
Summary:
Follow up to 9ec9567390
Closes https://github.com/facebook/react-native/pull/16759

Differential Revision: D6285219

Pulled By: hramos

fbshipit-source-id: 7012d257a5a6cff06cb2d94203a9379e4b7e3c4e
2017-11-09 09:55:05 -08:00
Héctor Ramos 9ec9567390 Flatten jsdocs to markdown plaintext
Differential Revision: D6261799

fbshipit-source-id: 269e151c5d136c1d508d9f2a060c0c670d0fe0f2
2017-11-07 16:46:52 -08:00
alpparkan 9476730cc4 Fixed "putExtra" typo in HeadlessJSAndroid
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!

-->

Improved documents by fixing a typo

No code was changed

<!--
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/16643

Differential Revision: D6241688

Pulled By: hramos

fbshipit-source-id: ffe6f8be369c95bb16fe82719dfc943bb6223191
2017-11-04 11:45:55 -07:00
Jaroslav Khorishchenko acead8e2ba fix(docs): fixing wrong module name in the example of "Integration with Existing Apps" page
Summary:
The current example of `Objective-C/Swift` component will not work cos of wrong module name in the example. If change `MyReactNativeApp` to the `RNHighScores` everything starts working.

[DOCS] [BUGFIX] [IntegrationWithExistingApps.md] - Wrong module name in the example.
Closes https://github.com/facebook/react-native/pull/16675

Differential Revision: D6241675

Pulled By: hramos

fbshipit-source-id: d1ce8764399c4589d99060fba726aae0a379f183
2017-11-04 11:45:55 -07:00
Liam Sheppard dc207ec40e Docs: Update ImprovingUserExperience.md
Summary:
Made link to a page more consistent with the linking style used throughout this file [e.g `hitSlop` and `TouchableNativeFeedback`], I almost missed the `'(See docs)'` link.

`TouchableNativeFeedback` was pointing to the wrong URL.

N/A

* [DOCS] [BUGFIX] [ImprovingUserExperience.md] - Adjusted link for `KeyboardAvoidingView`
* [DOCS] [BUGFIX] [ImprovingUserExperience.md] - Fix `TouchableNativeFeedback` URL
Closes https://github.com/facebook/react-native/pull/16609

Differential Revision: D6197335

Pulled By: hramos

fbshipit-source-id: 305d9cf7c9e870882fb74f503b800887d450edcf
2017-10-31 09:42:07 -07:00
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