Summary:
Thanks for submitting a PR! Please read these instructions carefully:
- [ ] 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.
What existing problem does the pull request solve? Minor omission in doc.
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.
No code changes.
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/13666
Differential Revision: D4953796
Pulled By: javache
fbshipit-source-id: 131c2326d6631fe193f6ccae124e1f09af3f5c73
Summary:
It's supposed to take a component or a handle, per the arg name, so switch on the type (and handle `null`).
`FlatListExample` no longer crashes.
Reviewed By: bvaughn, sebmarkbage
Differential Revision: D4752619
fbshipit-source-id: 720421f648f7c2049b5cc44f006484eb47d22d86
Summary:
This switches our React feature flag so that componentWillMount happens before
componentWillUnmount when a child switches. It used to be inconsistent and this
makes it consistent and inline with what React Fiber does.
Breaking change. May cause issues.
Reviewed By: spicyj, bvaughn
Differential Revision: D4626543
fbshipit-source-id: f7eaf1ebd479ca9fada012f903a2f972a7901b40
Summary:
When a touch responder gets unmounted, it can still get events dispatched to it.
We used to ignore those errors but in the new model we read the props instead of the event listener bank. The props still exist after unmount.
Instead, I check that the rootNodeID is still set since this gets reset during unmount.
Reviewed By: spicyj, bvaughn
Differential Revision: D4597127
fbshipit-source-id: b405e4ef1bcb14970be76d9ab7203cebf1f4d6c9
Summary:
Syncs the latest changes from the React GitHub repo and takes a dependency on React 16 alpha.
I had to hide the type checker stuff behind `__DEV__` because they now throw in production.
Also disabled flow for findNodeHandle for now since we have some further clean up to do.
Reviewed By: spicyj
Differential Revision: D4526535
fbshipit-source-id: af5d282e75afbb293560b62fc72657461c24bdd1
Summary:
findNodeHandle is considered an internal module. The one to use is ReactNative.findNodeHandle. We need to rely on this because we will have two different renderers and we need the renderers to inject themselves with findNodeHandle before it is used.
I use ReactNative.findNodeHandle from inside the module because I think this leads to a cycle somewhere or might not play well with inline require otherwise.
There is also one in UIManager but that is definitely a cycle so I'm going to try to avoid that one.
Reviewed By: spicyj, bvaughn
Differential Revision: D4533911
fbshipit-source-id: f771641ea5c5366ccbaff68c42202fa6f8c18cb3
Summary:
Largely typing fixes to deal with the glut of new `FlowFixMe` suppressions introduced with flow 0.38 in a4bfac907e
Tested with flow itself. CC gabelevi
Closes https://github.com/facebook/react-native/pull/11985
Differential Revision: D4452045
Pulled By: ericvicenti
fbshipit-source-id: acc46c4c406ae706a679e396be1d40ae2f4ce5a1
Summary:
A temporary React Native compatibility fix was added to React in commit [bba0d99](bba0d992d8) and subsequently removed in commit [e612826](e612826650). I noticed this while testing the React Native fiber renderer and attempting to use `Systrace`.
This commit updates React Native to no longer rely on the deprecated method and module.
PS I'm not sure if I should also update `ReactDebugTool` with this commit or wait for a subsequent sync script to update it. I haven't committed to this repo before. Please advise. 😄
Closes https://github.com/facebook/react-native/pull/11970
Differential Revision: D4446219
Pulled By: bvaughn
fbshipit-source-id: f286b8a4d00cdcbfbb49f52b9f1db5231d453f4c
Summary:
**Motivation**
On Exponent we load fonts dynamically and assign their native names by appending a session id, so that fonts from one Exponent "experience" do not clash with each other. So, before sending the `fontFamily` to native, we want to change it to the Exponent-scoped `fontFamily`.
Example:
```js
// Before rendering your app
StyleSheet.setStyleAttributePreprocessor('fontFamily', _processFontFamily);
function _processFontFamily(name) {
// Pass system fonts through
if (!name || Constants.systemFonts.indexOf(name) >= 0) {
return name;
}
if (!Font.isLoaded(name)) {
if (__DEV__) {
console.error(`${name} is not a system font and has not been loaded through Exponent.Font.loadAsync. If you intended to use a system font, make sure you typed the name correctly and that it is supported by the current operating system. If this is a custom font, be sure to load it with Exponent.Font.loadAsync`);
} else {
return 'system';
}
}
return `ExponentFont-
Closes https://github.com/facebook/react-native/pull/11138
Differential Revision: D4245518
Pulled By: mkonicek
fbshipit-source-id: bd2452b1129d6675aa7b88e41351f8bb61fa20a3