Commit Graph

12105 Commits

Author SHA1 Message Date
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
Mike Grabowski c0e6d415ce Migrate Travis over to Circle
Summary:
This pull request migrates Travis to Circle and pre-starts iOS simulators / tvOS ones as advised in documentation to speed up builds. It also uses Xcode 9.0 to build and test apps.

Note that podspec test is failing and it's been failing for a while on Travis as well (since podspec has been changed to use Cxx bridge by default). I've notified few folks here of that and we are looking to fix this test, but it's not related to the scope of this PR.

Also, previously, podspec tests were only runninng on master (disabled for PR builds) where I think it makes more sense to run them on PR builds as well (all in all, we want to prevent breakage before merging). That said, I've removed `if` check to make it run on all builds.

Other small changes:
- cache `node_modules` properly (previously defined as restore_cache and save_cache but not referenced in following jobs)
Closes https://github.com/facebook/react-native/pull/16354

Differential Revision: D6054858

Pulled By: hramos

fbshipit-source-id: 5165bef0985f4257febced14873be5bcb80b9f51
2017-10-13 16:19:36 -07:00
Max Sherman f3b117abd0 Un-revert logMarker for hermes diff
Reviewed By: mhorowitz

Differential Revision: D6051880

fbshipit-source-id: 0ce4bbed9ba8579033ee5397ff6c0975b6886fb1
2017-10-13 14:01:43 -07:00
Trevor Brindle 9877c08855 add release notes/changelog requirement to PR Template
Summary:
grabbou has to write release notes for every release, and that's getting ridonc. Have you seen the changelog from 0.48?

PR writers need to do their own, hopefully in a standardized format so it can be scripted.

Just a PR template change, just proofreading needed. Please mention if have missed or added any extra Categories, Types, or Where columns.

Here's a sample:

[GENERAL] [ENHANCEMENT] [PULL_REQUEST_TEMPLATE.md] - added release notes/changelog requirement to PR Template
Closes https://github.com/facebook/react-native/pull/15874

Differential Revision: D6054557

Pulled By: hramos

fbshipit-source-id: 5741b98a0efdb1a6aaaeedaa292403b82ce713f6
2017-10-13 13:35:25 -07:00
Tim Yung 2fff445b13 RN: Improve NativeEventEmitter Flow Types
Reviewed By: fkgozali

Differential Revision: D6050987

fbshipit-source-id: 1c911bed23f7d26800aafed4b7e7c30a1197f64b
2017-10-13 08:04:17 -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
Max Sherman e60a2d0a53 Revert D5939688: [hermes][rn] Share logPerfMarker with hermes
Differential Revision: D5939688

fbshipit-source-id: 37daeeaa01144472c26383106c88dd49bb99a37b
2017-10-12 19:21:42 -07:00
Héctor Ramos Ortiz 3826c14c04 Configure a couple new bot integrations
Summary: Closes https://github.com/facebook/react-native/pull/16344

Differential Revision: D6044166

Pulled By: hramos

fbshipit-source-id: 651bec1c1d1afa974f5a7b285ccf8a77bf281d21
2017-10-12 17:47:31 -07:00
Alex Hernandez ff908aa9fc Add helpful examples to Android test env validation failure messages.
Summary:
Hi there!

I set up the repo because I want to do a little contribution to the Android side but ran into trouble [running tests](https://facebook.github.io/react-native/docs/contributing.html). The Android environment validation kept failing. While the messages were a little helpful, it would have saved me a bit of time and research if I had some helpful examples to copy-and-paste. In my case, I'm using Android SDK Tools on the command line. Hopefully, this will help others when setting up!

Run `./scripts/run-android-local-unit-tests.sh` with each of the following to see the expanded help messages:

* Make sure `$ANDROID_HOME/platforms/android-$MAJOR` is _not_ present.
* Make sure `$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION` is _not_ present.
* Make sure `JAVA_HOME` is _not_ set and/or is _not_ in `PATH`.
Closes https://github.com/facebook/react-native/pull/16222

Differential Revision: D6044875

Pulled By: ericnakagawa

fbshipit-source-id: febacbd08fb632b349c352035f24eed891fbd154
2017-10-12 15:33:04 -07:00
Max Sherman fe62da34a6 Share logPerfMarker with hermes
Reviewed By: mhorowitz

Differential Revision: D5939688

fbshipit-source-id: ab6a86eb66a3d9501b9b5a55b562b277b5ab0620
2017-10-12 15:33:04 -07:00
Janic Duplessis 2b4ff6ea19 Native Animated - Restore default values when removing props on Android
Summary:
Rebased version of #12842 that was reverted because of failing fb internal tests.
Closes https://github.com/facebook/react-native/pull/15919

Differential Revision: D5823956

Pulled By: hramos

fbshipit-source-id: 4ece19a403f5ebbe4829c4c26696ea0575ab1d0e
2017-10-12 13:11:00 -07:00
Alex Dvornikov dd400f842b add "jsBundlesDirectory" method to RCTBridgeDelegate
Differential Revision: D6030185

fbshipit-source-id: 58d6f9d0d412c7ad0f83af9ae4df01c4dc1178bc
2017-10-12 12:33:21 -07:00
Sergei Dryganets 4192790f05 more detailed CxxModule logging
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!

-->

Cxx module code swallows c++ exception details with sarcastic comment let native developer figure it out.

Now instead of swallowing it, we print as much information as we can for different exception types.
Still not ideal but way more informative.

Have a crash in your c++ module and try to figure it out without this change.
Closes https://github.com/facebook/react-native/pull/16193

Differential Revision: D6040038

Pulled By: javache

fbshipit-source-id: 3fbe838383ca13395e21f74c9549474f6329cfeb
2017-10-12 12:02:11 -07:00
alejandro garcia 224d29447f Fixed navigation template
Summary:
- [x] Explain the **motivation** for making this change.

It fixes #14313
Closes https://github.com/facebook/react-native/pull/14495

Differential Revision: D6042094

Pulled By: hramos

fbshipit-source-id: d70e42bfee0a22882bad91cb885fb0cfc91c7d38
2017-10-12 11:44:20 -07:00
Valentin Shergin f2c6877b91 Fixed crash on attempt to update local data of deallocated shadow node
Summary:
Trivial.
That's okay that sometimes shadowNodes and views hierarchies have lack of synchonization.

Reviewed By: sahrens

Differential Revision: D6040022

fbshipit-source-id: 6b49a82317b620b66a87441719fddcafb1f27934
2017-10-12 09:46:29 -07:00
Alex Dvornikov 452ac1b58e Added "fetchBundle" global function
Reviewed By: jeanlauliac

Differential Revision: D5985425

fbshipit-source-id: 72de85d354e85b8f7d98c95d5aa5348484d26204
2017-10-12 09:46:29 -07:00
Michael Lee 7997a2b749 Fix platform flags to also check for linux
Reviewed By: danzimm

Differential Revision: D6036995

fbshipit-source-id: 98d7f19eb80b72090b26252864a6bd41a3295462
2017-10-12 09:16:40 -07:00
Scott Yost f9047cdfaf Revert D5932093: [RAMBO] Final fixes
Differential Revision: D5932093

fbshipit-source-id: 8e6ac0482a4c5a9ae4549be73d316df919613c9b
2017-10-12 09:16:40 -07:00
Mike Grabowski 73eb6c2481 Fix failing flow tests
Summary:
Metro Bundler ships with `react_native_fb` flow annotations whereas our repo is set to ignore `react_native_oss` flow issues.

For now, a hot fix is to make our repo ignore both.

Detailed discussion happens here: 87cfc05ea6 (commitcomment-24884835)

Those changes have been applied to `0.50.0-rc.0` in order to make it green.
Closes https://github.com/facebook/react-native/pull/16310

Differential Revision: D6031378

Pulled By: hramos

fbshipit-source-id: 491d866bb35bd6c30a27dbc04586b15144a8efb2
2017-10-12 09:01:26 -07:00
Tim Wang 38354d94f1 Add timwangdev to GitHub Issue task force
Summary:
I've submit few PRs for bug fix in recent releases and I've been working actively on some commercial react-native projects. I'd like to contribute the project with issues management and PR reviews.
Closes https://github.com/facebook/react-native/pull/16328

Differential Revision: D6040721

Pulled By: hramos

fbshipit-source-id: 61347fe53112c5ed89c6d58d2c7fec341db974be
2017-10-12 08:51:06 -07:00
Dan Caspi 0da1738e9b Final fixes
Reviewed By: amnn

Differential Revision: D5932093

fbshipit-source-id: f52a0bb3552af5ad003c051dc32dff0bfabb43ac
2017-10-12 08:27:17 -07:00
Jean Lauliac acd9a29d94 js1 metro-bundler: add script to publish new version
Reviewed By: davidaurelio

Differential Revision: D6019220

fbshipit-source-id: 97bb53323b29609e192f0e4f4d79b6be6440b98e
2017-10-12 03:15:15 -07:00
Mike Grabowski b2eb7fd77b Fix broken releases script
Summary:
Fails on my machine due to fact that `replace` returns an instance of a String, rather than an instance of ShellString (that includes `to` on its prototype).

Solution is to use an explicit `writeFileSync`. You can see that change in the wild on 0.50-stable branch.

CC janicduplessis (edit by hramos)
Closes https://github.com/facebook/react-native/pull/16303

Differential Revision: D6031331

Pulled By: hramos

fbshipit-source-id: 41c583d53df75bea1a55fa19174d912e414209c0
2017-10-11 19:47:03 -07:00
Alex Kotliarskyi cc86d12175 Android: put all non-drawable resources to `res/raw`
Summary: When we built packager asset system we were mostly concerned about images. However, this system can also be used to work with videos, animations and other binary resources. The code that sorts assets into Android resource folders currently just shoves all non-drawable resources under `drawable-mdpi`, which is not ideal. Talking to Android experts on the team, `raw` seems like a much better place for other resources.

Reviewed By: jeanlauliac

Differential Revision: D6026633

fbshipit-source-id: cc2199f60da411ea432972a02f52c459ff5c490a
2017-10-11 15:11:29 -07:00
Mike Grabowski 1f498010e8 Remove mockFs dependency
Summary:
This is first PR from the series I am going to be sending as a result of fixing 0.50-stable test suite. This one removes `mockFS` dependency that has been causing failures on Node 6.x container.

Here's build before this change: https://circleci.com/gh/facebook/react-native/22529
Here's build after this change: https://circleci.com/gh/facebook/react-native/22538 (green)

Note that the CI may be still red as there are other PRs to be addressed. You can see this in the wild on 0.50.
Closes https://github.com/facebook/react-native/pull/16301

Differential Revision: D6031352

Pulled By: hramos

fbshipit-source-id: 5c97ae6c87864c094e29e5d8987521071c67f5bd
2017-10-11 15:11:28 -07:00
Peter Ruibal 0ec04ed8ef Remove redundant style field from ScrollView propTypes.
Summary:
We're spreading this in via `...ViewPropTypes` also.  Having both confuses
flow when you try to pass style (even though they're identical), when the
types are defined via `React.ElementProps`

Reviewed By: jingc

Differential Revision: D6028659

fbshipit-source-id: 203e29682d34f1648a47d9ddbaef0c9630fbcb99
2017-10-11 14:25:35 -07:00
Mike Grabowski 4d77c74c76 Fix Analyze step on CI
Summary:
Recent changes that introduced Circle 2 (thanks ide and hramos for work on this) include special step for analyzing code. It takes PR number and processes the build.

Unfortunately, that breaks all non-PR builds (including ones scheduled by me as a part of release step).

This PR simply checks if such env variable is set and stops executing in case it's undefined.

Also, I have updated the order of the tests so that most important (unit tests) are no longer shadowed by temporary eslint and flow breakage. The reason for this change is that flow has been broken for ~20 days which shadowed breakage in unit tests (addressed in my other PR).

You can see build breaking before this change: https://circleci.com/gh/facebook/react-native/22391
And being green after: https://circleci.com/gh/facebook/react-native/22530
Closes https://github.com/facebook/react-native/pull/16302

Differential Revision: D6031348

Pulled By: hramos

fbshipit-source-id: f1127a87faa872f413e9fcb780bdc1d5d587de2c
2017-10-11 13:46:53 -07:00
Maxime Thirouin 78d570511a Remove unused variable in HelloNavigation example
Summary:
Because it's just unused :)
Closes https://github.com/facebook/react-native/pull/16294

Differential Revision: D6030121

Pulled By: ericnakagawa

fbshipit-source-id: c0e9ad75413cb2ab6fbf1b46517a033f36a627a7
2017-10-11 07:07:21 -07:00
Peter Ruibal 752b68857c Add `visible-password` for TextInput.keyboardType on Android
Summary:
`visible-password` represents a very basic keyboard, typically only
letters and numbers.  Backed by InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD,
it is useful for things like password and code entry fields. It can also be more
effective than autoCorrect={false} for disabling autocompletion on some keyboards
(like Gboard).

Note `secureTextEntry` also affects `TYPE_TEXT_VARIATION_*` flags internally, so there
may be some undefined behavior when combining `secureTextEntry` with
`keyboardType="visible-password"`

Also, while here, improve the documentation on TextInput to explicitly enumerate
which keyboardType applies to Android vs. iOS (since this is the first android-specific)

Reviewed By: shergin

Differential Revision: D6005353

fbshipit-source-id: 13af90c96353f714c0e106dd0fde90184a476533
2017-10-10 18:18:34 -07:00
Riley Dulin 7b575d669d Improve flow typing and linting for MessageQueue
Differential Revision: D5987892

fbshipit-source-id: 8b9218875944decc5e21863e3c3f3a659ff2e2e4
2017-10-10 16:32:28 -07:00
Paito Anderson 1f8826815d Fixed a blog typo
Summary: Closes https://github.com/facebook/react-native/pull/16283

Differential Revision: D6024724

Pulled By: hramos

fbshipit-source-id: 1fa1a5341f33e766a5d12ec6da9cb88f633e38af
2017-10-10 15:22:07 -07:00
Héctor Ramos a55192074e Update IssueCommands.txt 2017-10-10 15:19:52 -07:00
Héctor Ramos 1de46b5664 Add React Native Bot
Summary:
trivial
Closes https://github.com/facebook/react-native/pull/16282

Differential Revision: D6023796

Pulled By: hramos

fbshipit-source-id: d3a0ed497ab6cd0d4d4f11e0b2cd38c4f3020ebf
2017-10-10 14:30:48 -07:00
Cameron Little 2fb9eeb7e1 Fix typo in Text
Summary: Closes https://github.com/facebook/react-native/pull/16277

Differential Revision: D6021941

Pulled By: ericnakagawa

fbshipit-source-id: 3e541082ac5ead7e321baa8f6a00e5ccdbe8c774
2017-10-10 13:20:18 -07:00
Héctor Ramos a72a7bc2c2 Add missing template label when closing using a bot command 2017-10-10 11:39:26 -07:00
Dmitry Zakharov ca834f96af Fix scrolling events for RN.
Reviewed By: bvaughn

Differential Revision: D6020664

fbshipit-source-id: c9fb9069e9dcde298901ba2c03bacc8b646844d0
2017-10-10 11:08:40 -07:00
Peter Ruibal e50464d1d7 Unbreak doc generation for SectionList
Reviewed By: hramos

Differential Revision: D6018285

fbshipit-source-id: c21deaaa90627936ce29b0212b06640fa38b82f4
2017-10-10 10:45:47 -07:00
Dmitry Zakharov 04ff184c12 Make RCTUIManager and RCTDeviceInfo unsubscribe from NSNotificationCenter on
Reviewed By: fromcelticpark

Differential Revision: D5986167

fbshipit-source-id: 18131572361c4b3f5e0ed5c8f97833a21902cad1
2017-10-10 05:10:05 -07:00
Lukas Kurucz bbc3f603f1 Add minimal example to actionsheet
Summary:
Easier to understand how to use this component. A quick example helps to beginners.
Closes https://github.com/facebook/react-native/pull/16110

Differential Revision: D6017956

Pulled By: shergin

fbshipit-source-id: 82a340dfe8551cc8d7b692b9c71237e2b4421aba
2017-10-10 03:32:08 -07:00
Peter Ruibal d501713bad Fix npm start in website/
Summary: We can't use spread syntax here.  Prefer Array.concat().

Reviewed By: sahrens

Differential Revision: D6014142

fbshipit-source-id: d2759893ea2df69975843ae821fb08b16b1d5d7c
2017-10-10 01:32:39 -07:00
Masayuki Iwai a541d58bc4 Fix that section headers in SectionList don't stick at correct position.
Summary:
I noticed that section headers in SectionList don't stick at correct position in case of using with contentInset and contentOffset. (See the demo below. It looks that contentInset.top is ignored.)
This is a common case of use of NavigationBar and TableView on iOS.

![](https://user-images.githubusercontent.com/143255/29018708-1e2f98aa-7b97-11e7-9599-19dbb832266d.gif)

Here is a demo and an example code:

![](https://user-images.githubusercontent.com/143255/29018753-4201f660-7b97-11e7-9d31-28413d1b6269.gif)

```jsx
import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  SectionList,
} from 'react-native';

export default class RNScrollExample extends Component {
  renderSectionHeader(title) {
    return (
      <View style={styles.sectionHeader}>
        <Text>{title}</Text>
      </View>
    )
  }

  renderItem(content) {
    return (
      <View style={styles.cell}>
        <Text>{`Item ${content}`}</Text>
      </View>
    )
  }

  renderSeparator() {
    return <View style={styles.separator} />
  }

  renderSectionList() {
    const sections = Array.from(Array(10), (e, i) => ({ title: `Section ${i+1}`, data: Array.from(Array(10)).map((e, i) => i+1) }))
    const navigationBarHeight = 64
    return (
      <SectionList
        contentInset={{ top: navigationBarHeight }}
        contentOffset={{ y: -navigationBarHeight }}
        sections={sections}
        keyExtractor={(item, index) => index}
        renderSectionHeader={({ section }) => this.renderSectionHeader(section.title)}
        renderItem={({ item }) => this.renderItem(item)}
        ItemSeparatorComponent={this.renderSeparator}
      />
    )
  }

  renderHeader() {
    return (
      <View style={styles.header}>
        <Text style={styles.headerText}>Contents</Text>
      </View>
    )
  }

  render() {
    return (
      <View>
        {this.renderSectionList()}
        {this.renderHeader()}
      </View>
    )
  }
}

const styles = StyleSheet.create({
  header: {
    position: 'absolute',
    top: 0,
    left: 0,
    right: 0,
    height: 64,
    paddingTop: 20,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#ffffffcc',
  },
  headerText: {
    fontSize: 16,
    fontWeight: 'bold',
  },
  sectionHeader: {
    paddingHorizontal: 8,
    paddingVertical: 4,
    backgroundColor: '#05bbd3',
  },
  cell: {
    paddingHorizontal: 8,
    paddingVertical: 16,
    backgroundColor: '#82dde9',
  },
  separator: {
    height: 1,
    backgroundColor: '#7d888d',
  },
});

AppRegistry.registerComponent('RNScrollExample', () => RNScrollExample);
```
Closes https://github.com/facebook/react-native/pull/15395

Differential Revision: D5988720

Pulled By: shergin

fbshipit-source-id: d33f6ee943d4f913970e26c322b66b3c9c948a02
2017-10-09 22:45:48 -07:00
Nivetha Singara Vadivelu 9424cd7e8f Handling exceptions in video player
Reviewed By: furdei

Differential Revision: D5958119

fbshipit-source-id: 79b431a8422d60134890d44e99c358a07a5adc5b
2017-10-09 22:45:48 -07:00
Sai Teja Jammalamadaka 4e5d50d6ad Issue #16159 - RCTImageStoreManager's priority
Summary:
RCTImageStoreManager and RCTBlobManager have the same priority, hence in certain cases, both are able to handle the request, but this causes non-deterministic behavior. Hence increased ImageStoreManager's Priority to 1 and thereby increasing RCTImageLoader's Priority to 2 to prevent similar issue of same priorities.

Issue: #16159
Closes https://github.com/facebook/react-native/pull/16160

Differential Revision: D6017931

Pulled By: shergin

fbshipit-source-id: 91f2737af4f2f97197734b696105e1cdc5683365
2017-10-09 22:31:25 -07:00
Gustavo Gard dbe6044074 Correct propTypes for placeholder
Summary:
Proptype mistake, placeholder is a "string" not a "node".

1e8f3b1102/Libraries/Text/RCTBackedTextInputViewProtocol.h (L18)

4d54b48167/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java (L300)
Closes https://github.com/facebook/react-native/pull/16237

Differential Revision: D6017909

Pulled By: shergin

fbshipit-source-id: 75046080a0f33196832f5d4ab58f8b1f4aabad1f
2017-10-09 22:31:24 -07:00
Janis Peisenieks 7a7bdeec3e Omit all line terminators for ImageStore.getBase64ForTag
Summary:
FIX #11142

This fixes #11142 and supersedes #11155 as I was unsure how to add/change commits in that PR.

Wrote up a bunch of unit tests for the ImageStore module. The added tests showed that there was indeed a problem with the flags used for the Base64OutputStream, and they also show that that has been fixed now.
Closes https://github.com/facebook/react-native/pull/13856

Differential Revision: D6017764

Pulled By: shergin

fbshipit-source-id: adf667dc722ddfe31449afd8cd20a0a192eacff6
2017-10-09 22:16:20 -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
Gustavo Gard 57b4f49db0 Remove broken links
Summary:
Issue https://github.com/facebook/react-native/issues/16255

Remove broken links
Closes https://github.com/facebook/react-native/pull/16262

Differential Revision: D6017751

Pulled By: hramos

fbshipit-source-id: a9465a8a8212dc7b5e1aae21c73b46e60e24c10e
2017-10-09 22:02:09 -07:00
Jimmy Mayoukou 4eccb16935 Add finally method to Promise flow definition
Summary:
The `finally` method definition was missing, while it really exists causing a flow error when using it.

Added the method definition and make sure flow doesn't throw any error anymore on a real-life example.
Closes https://github.com/facebook/react-native/pull/16115

Differential Revision: D6017950

Pulled By: shergin

fbshipit-source-id: 296f3467152eb6eedac817a89cf075e9f906a389
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
Julien Moutte bbceb48dbb Direct assignment of the ref to avoid warning when mocking.
Summary:
When Jest is mocking native components that are assigned a ref with an arrow function, a warning is generated about stateless components which can not have a ref. This does not happen when the ref is assigned directly.

Fixes #16045.
<!--
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!

-->

The test provided in the related issue is used to validate the fix. I don't know how to detect console warnings in a Jest test.
Closes https://github.com/facebook/react-native/pull/16046

Differential Revision: D6017903

Pulled By: ericnakagawa

fbshipit-source-id: a7ed61c39f141a4094f08fc875289a7a79ebe9e8
2017-10-09 21:46:20 -07:00