Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Loop through RCTViewManager inheritance tree #14260

Closed

Conversation

cbrevik
Copy link
Contributor

@cbrevik cbrevik commented May 30, 2017

Motivation

See discussion in #10946. The motivation is to make RCTViewManager more extensible.

If you want to inherit from a native ViewManager, your custom ViewManager will not automatically expose the parents' props. So the only way to do this today, is to basically copy/paste the parent ViewManager-file, and add your own custom logic.

With this PR, this is made more extensible by automatically looping through the parents' props, and exposing those for the child ViewManager as well.

Test plan
The test plan is the same as the other PR (#10946). I've made an simple test app which extends RCTWebViewManager: https://github.com/cbrevik/overrideWebview

See RCTCustomWebViewManager.h and RCTCustomWebViewManager.m for a simple implementation.

CC @shergin (#10946 (comment))

Allows for easier extension of ViewManagers
@facebook-github-bot facebook-github-bot added GH Review: review-needed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels May 30, 2017
@javache
Copy link
Member

javache commented May 30, 2017

While this is a good idea, UIManager constants is already one of the more expensive parts of bridge startup, and this increases it significantly, since every view manager inherits from RCTViewManager.

Could you consider different approach, e.g. by sending the hierarchy info over to JS instead, and dynamically figuring out if the supported prop is in the inheritance chain.

We should also decide whether everything inheriting from RCTViewManager makes sense. I'm sure there's plenty of views that don't want to inherit all of these props, and this doesn't give them a choice.

@shergin
Copy link
Contributor

shergin commented May 31, 2017

@javache Yeah, Pieter, performance is also my biggest concern here.
I have not reviewed this diff carefully yet, but seems that we add only one additional call (message pass) to view managers which do not utilize new (inheritance) feature, and it is superClass = [superClass superclass]; (we probably can replace it with one magic ObjC runtime C function). Right?

I am assuming that actual base class (RCTViewManager, which contains a ton of props) is parsed once somewhere else.

@shergin shergin added the Platform: iOS iOS applications. label May 31, 2017
@shergin shergin self-requested a review May 31, 2017 01:02
@shergin shergin self-assigned this May 31, 2017
@cbrevik
Copy link
Contributor Author

cbrevik commented May 31, 2017

@shergin Yes, exactly. The idea was that the performance footprint should stay relatively similar for existing modules. Only those that does not inherit directly from RCTViewManager should do more than one loop.

E.g. from my example app, the RCTCustomWebViewManager which inherits from RCTWebViewManager will do two loops, one to copy props from RCTCustomWebViewManager, and another to copy from RCTWebViewManager.

@javache Have to admit that I haven't run a perfomance timer on this code. I've only tried to compare startup time of RNTester with and without this change. Didn't see a difference in startup time there, but it would probably be worth it to do a more precise comparison.

@javache
Copy link
Member

javache commented May 31, 2017

All ViewManagers right now inherit from RCTViewManager, so they will also be inheritings its massive list of props (some of those won't even works, since they only apply to RCTView, and not the UIView-subclasses other view managers may vend).

I would suggest splitting RCTViewManager into a RCTViewManagerBase (abstract superclass) and RCTViewManager, and have most view managers inherit from RCTViewManagerBase.

@javache
Copy link
Member

javache commented May 31, 2017

Also, let's make sure this behaviour is consistent with the Android API's.

@javache javache self-requested a review May 31, 2017 09:01
@shergin
Copy link
Contributor

shergin commented May 31, 2017

@javache
Yes, yeah, I agree it would be awesome if we can introduce some another base class for managers which will contain only completely necessary props, and RCTViewManager will have all our sophisticated styling props. If we do this, we can also get rid of all kinda default implementation of these style props inside RCTViewManager (because we can assume that all views generated by
RCTViewManager are RCTView subclasses). (This is my everyday pain and my dream. I am already working on making (at least) and RCTView subclasses.)

So... It actually means that we NEED this PR for allowing inheritance! Right?

Speaking about performance,
Yes, all view managers inherit from RCTViewManager right now, but we do not recreate/regenerate view configs for/from RCTViewManager for every subclass. We did not do this, and this PR do not introduce it. I also believe we have to cache viewConfigs for every class though. (Not in this PR.)

So, I propose we should make it real step by step:

  1. Introduce the possibility of inheritance (this PR);
  2. Add cache mechanism for all view manager classes. (We can store generated config as class/static variable.) (It will help a lot for next step!)
  3. Introduce a new view manager base class (something like RCTElementManager) and move bunch of core props from RCTViewManager to this class.
  4. Introduce a new "policy": new RCTViewManager subclasses should not rely on "default" props implementation inside RCTViewManager. We can enforce via warning;
  5. Make all really custom elements (such as NavigationBar or something like that) inherit from RCTElementManager instead of RCTViewManager.
  6. ...
  7. Profit!

So, why I am personally interested in it? Because I would love to have base manager class for our both implementations.


Class superClass = _managerClass;
while (superClass && superClass != [RCTViewManager class]) {
if ([superClass isSubclassOfClass:[RCTViewManager class]]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand @shergin. This code will iterate through all of the superclasses of a view manager (up-to-and-including RCTViewManager), so propTypes will be much bigger, and we'll have to send way more information to JS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second part of the while condition excludes RCTViewManager.

superClass != [RCTViewManager class]

So it shouldn't add RCTViewManager props.

Copy link
Contributor Author

@cbrevik cbrevik May 31, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it bascially loops through the inheritance-chain, until it hits RCTViewManager, and then breaks out. Which should make it behave as it does today, only that it supports further sub-classing of other view managers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it worked before even without iterating over RCTViewManager! So, even it it does now, it is not intentional. I would try to optimize this iteration a bit by using some ObjC runtime functions (because we can and because we care 😄 ), but I want to have conceptual consensus before.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, how about RCTViewManager itself then? Where does that get exported?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That the point. I have not idea, yet. 😄 Do you?
Okay, I will figure out. You are right, we have to know that before making this kind of changes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Just to be clear, I am no so reckless, I plan to investigate it before landing this, I just want to have a consensus among us related to the general move.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my point. This diff is broken for the base case of RCTViewManager as far as I can tell.

Other than that, I agree with your strategy (save for some bikeshedding on naming), atlhough I'd change the order of operations a bit: there should be no in-between state where RCTViewManager works but warned against, since it's not supported right now and getting rid of the warning is just going to be painful (your point 4)

@shergin
Copy link
Contributor

shergin commented May 31, 2017

@javache You are right. We have to rethink whole approach.

// The ViewConfig doesn't contain any props inherited from the view manager's
// superclass, so we manually merge in the RCTView ones. Other inheritance
// patterns are currenty not supported.
const nativeProps = {
...UIManager.RCTView.NativeProps,
...viewConfig.NativeProps,
};

The right approach can be:

  • Export intermediate view managers as well;
  • Add baseClassName info to viewConfig;
  • And then re-establish inheritance relationship on JS side inside requireNativeComponent.

I can try to do it.

@cbrevik
Copy link
Contributor Author

cbrevik commented Jun 1, 2017

Ah sorry, I understand the issue now. In that case, your approach seems better @shergin and I'll close this PR in favor of that.

@cbrevik cbrevik closed this Jun 1, 2017
facebook-github-bot pushed a commit that referenced this pull request Jul 10, 2017
Summary:
**Motivation**
This is a re-worked version of #14260, by shergin's suggestion.

For iOS, if you want to inherit from a native ViewManagers, your custom ViewManager will not automatically export the parents' props. So the only way to do this today, is to basically copy/paste the parent ViewManager-file, and add your own custom logic.

With this PR, this is made more extensible by exporting the `baseModuleName` (i.e. the iOS `superclass` of the ViewManager), and then using that value to re-establish the inheritance relationship in `requireNativeComponent`.

**Test plan**
I've run this with a test project, and it works fine there. But needs more testing.

Opened this PR as [per shergin's suggestion](#10946 (comment)) though, so we can discuss approach.

**Discussion**
* Android already supports inheritance, so this change should be compatible with that. But, not every prop available on `UIManager.RCTView.NativeProps` is actually exported by every ViewManager. So should `UIManager.RCTView.NativeProps` still be merged with `viewConfig.NativeProps`, even if the individual ViewManager does not export/use them to begin with?
* Does this break other platforms? [UWP](https://github.com/Microsoft/react-native-windows)?
Closes #14775

Differential Revision: D5392953

Pulled By: shergin

fbshipit-source-id: 5212da616acfba50cc285e2997d183cf8b2cd09f
facebook-github-bot pushed a commit that referenced this pull request Dec 4, 2018
Summary:
@public
This sync includes the following changes:
- **[6bf5e8598](facebook/react@6bf5e8598)**: Fix scheduler setTimeout() re-entrancy check (#14384) //<Brian Vaughn>//
- **[7a48c900b](facebook/react@7a48c900b)**: Prevent a v8 deopt when profiling (#14383) //<Brian Vaughn>//
- **[f00c2755b](facebook/react@f00c2755b)**: Removed unnecessary externals from Jest bundles (#14372) //<Brian Vaughn>//
- **[52bea95cf](facebook/react@52bea95cf)**: Fixed scheduler setTimeout fallback (#14358) //<Brian Vaughn>//
- **[1d25aa578](facebook/react@1d25aa578)**: [Fizz] New Server Rendering Infra (#14144) //<Sebastian Markbåge>//
- **[f1bf28160](facebook/react@f1bf28160)**: Fix bug in cloneHook (#14364) //<Imre Osswald>//
- **[16e120438](facebook/react@16e120438)**: [Fire] Add initial build infrastructure (#14359) //<Dan Abramov>//
- **[d14ba87b1](facebook/react@d14ba87b1)**: Validate propTypes for lazy() and memo() and warn about invalid patterns (#14298) //<Dan Abramov>//
- **[4f964f09c](facebook/react@4f964f09c)**: Adding isMemo check to react-is package (#14313) //<Jinto Jose>//
- **[c2a2d8a53](facebook/react@c2a2d8a53)**: Remove useMutationEffect (#14336) //<Sophie Alpert>//
- **[48f1e5b3c](facebook/react@48f1e5b3c)**: Add a null type test for memo (#14325) //<chun shang>//
- **[f93f3402f](facebook/react@f93f3402f)**: Make useEffect(async) warning more verbose (#14327) //<Dan Abramov>//
- **[ee3ef3a07](facebook/react@ee3ef3a07)**: Fix regression: Errors not emitted in streams (#14314) //<Pelle Wessman>//
- **[33f6f5e53](facebook/react@33f6f5e53)**: Remove usage of `fbjs/lib/invariant` in ReactNativeViewConfigRegistry. (#14330) //<Christoph Nakazawa>//
- **[686f1060a](facebook/react@686f1060a)**: Publish a local release (canary or stable) to NPM (#14260) //<Brian Vaughn>//
- **[7475120ce](facebook/react@7475120ce)**: Prevent deopts from modifying exports object in stable builds (#14309) //<Dan Abramov>//
- **[0c7189d92](facebook/react@0c7189d92)**: Fix resolution of outer props with React.memo() (#14312) //<Dan Abramov>//
- **[14be29b2b](facebook/react@14be29b2b)**: Add more test coverage for nested memo() (#14311) //<Dan Abramov>//
- **[dc0dd4bbf](facebook/react@dc0dd4bbf)**: Use |0 to coerce to number (#14297) //<Dan Abramov>//
- **[dd8205cef](facebook/react@dd8205cef)**: List ignored types instead of included types in the stack (#14308) //<Dan Abramov>//
- **[a9fdf8a32](facebook/react@a9fdf8a32)**: Warn about reassigning this.props (#14277) //<Dan Abramov>//
- **[327cf0ee3](facebook/react@327cf0ee3)**: Fix support for mixing react-dom/[email protected] and react@<16.6 (#14291) //<Dan Abramov>//
- **[c954efa70](facebook/react@c954efa70)**: Remove `import * as` pattern from the codebase (#14282) //<Sebastian Markbåge>//
- **[ccb14e270](facebook/react@ccb14e270)**: Fix SSR useCallback in render phase (#14279) //<Dan Abramov>//
- **[0e9cb3f5d](facebook/react@0e9cb3f5d)**: Clear fields on unmount of fiber to avoid memory leak (#14276) //<Dominic Gannaway>//
- **[592676503](facebook/react@592676503)**: Revert "Clear memoizedState on unmount of fiber to avoid memory leak (#14218)" (#14275) //<Dominic Gannaway>//
- **[9b2fb24f9](facebook/react@9b2fb24f9)**: Clear memoizedState on unmount of fiber to avoid memory leak (#14218) //<Dominic Gannaway>//
- **[a22fabc2a](facebook/react@a22fabc2a)**: Reduce scheduler serialization overhead (#14249) //<Jason Miller>//
- **[21d5f7d32](facebook/react@21d5f7d32)**: Wrap shorthand CSS property collision warning in feature flag (#14245) //<Andrew Clark>//
- **[8feeed10d](facebook/react@8feeed10d)**: [scheduler] Remove window.postMessage fallback //<Andrew Clark>//
- **[5bce0ef10](facebook/react@5bce0ef10)**: [scheduler] Post to MessageChannel instead of window (#14234) //<Andrew Clark>//
- **[f55795c8e](facebook/react@f55795c8e)**: Add regression test for #14188 (#14197) //<Dan Abramov>//
- **[b98adb648](facebook/react@b98adb648)**: Simplify CSS shorthand property warning (#14183) //<Sophie Alpert>//
- **[f8bfd5868](facebook/react@f8bfd5868)**: fix typo //<Sebastian Markbage>//
- **[961eb65b4](facebook/react@961eb65b4)**: Use unique thread ID for each partial render to access Context (#14182) //<Sebastian Markbåge>//
- **[1a6ab1e9b](facebook/react@1a6ab1e9b)**: SimpleMemoComponent should warn if a ref is given (#14178) //<Sophie Alpert>//
- **[8ae867e6b](facebook/react@8ae867e6b)**: Warn about conflicting style values during updates (#14181) //<Sophie Alpert>//
- **[d5e1bf07d](facebook/react@d5e1bf07d)**: Renamed outdated schedule/tracing referecnes (#14177) //<Brian Vaughn>//
- **[2dd4ba11e](facebook/react@2dd4ba11e)**: ESlint -> ESLint //<Andrew Clark>//
- **[9cc631a53](facebook/react@9cc631a53)**: Don't run danger on bad build (#14143) //<Sophie Alpert>//
- **[1034e26fe](facebook/react@1034e26fe)**: Fix typos (#14124) //<Heaven>//
- **[5618da49d](facebook/react@5618da49d)**: Fix comment typo (#14156) //<Bartosz Gordon>//
- **[9fb919945](facebook/react@9fb919945)**: Add global to ESLint plugin bundle config //<Andrew Clark>//
- **[c174f8592](facebook/react@c174f8592)**: Add fb build of ESLint plugin (#14165) //<Andrew Clark>//
- **[02e4848e3](facebook/react@02e4848e3)**: Improved suspense support in ReactDOMServer (#14161) //<Alex Taylor>//
- **[4b163fe](facebook/react@4b163fee1)**: Remove errant return assignment (#14164) //<Andrew Clark>//
- **[e58ecda9a](facebook/react@e58ecda9a)**: Suspense fuzz tester (#14147) //<Andrew Clark>//
- **[7fd1661f8](facebook/react@7fd1661f8)**:  Don't warn if an unmounted component is pinged (#14158) //<Andrew Clark>//
- **[f9e9913f0](facebook/react@f9e9913f0)**: [Synchronous Suspense] Don't delete children of suspended component (#14157) //<Andrew Clark>//
- **[7c560131b](facebook/react@7c560131b)**: Adding logger pri (#14155) //<Nathan Schloss>//
- **[3d8bda70e](facebook/react@3d8bda70e)**: Refactor ESLint configuration to enable better IDE integration (#13914) //<Minh Nguyen>//
- **[051272f20](facebook/react@051272f20)**: Use Entry in `yarn build ...` Instead of Label (#14148) //<Sebastian Markbåge>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions 3ff2c7c...6bf5e85

Reviewed By: bvaughn

Differential Revision: D13288288

fbshipit-source-id: 89a4837a9198c53fc79306933f589ef25d8bb4b6
grabbou pushed a commit that referenced this pull request Dec 4, 2018
Summary:
@public
This sync includes the following changes:
- **[6bf5e8598](facebook/react@6bf5e8598)**: Fix scheduler setTimeout() re-entrancy check (#14384) //<Brian Vaughn>//
- **[7a48c900b](facebook/react@7a48c900b)**: Prevent a v8 deopt when profiling (#14383) //<Brian Vaughn>//
- **[f00c2755b](facebook/react@f00c2755b)**: Removed unnecessary externals from Jest bundles (#14372) //<Brian Vaughn>//
- **[52bea95cf](facebook/react@52bea95cf)**: Fixed scheduler setTimeout fallback (#14358) //<Brian Vaughn>//
- **[1d25aa578](facebook/react@1d25aa578)**: [Fizz] New Server Rendering Infra (#14144) //<Sebastian Markbåge>//
- **[f1bf28160](facebook/react@f1bf28160)**: Fix bug in cloneHook (#14364) //<Imre Osswald>//
- **[16e120438](facebook/react@16e120438)**: [Fire] Add initial build infrastructure (#14359) //<Dan Abramov>//
- **[d14ba87b1](facebook/react@d14ba87b1)**: Validate propTypes for lazy() and memo() and warn about invalid patterns (#14298) //<Dan Abramov>//
- **[4f964f09c](facebook/react@4f964f09c)**: Adding isMemo check to react-is package (#14313) //<Jinto Jose>//
- **[c2a2d8a53](facebook/react@c2a2d8a53)**: Remove useMutationEffect (#14336) //<Sophie Alpert>//
- **[48f1e5b3c](facebook/react@48f1e5b3c)**: Add a null type test for memo (#14325) //<chun shang>//
- **[f93f3402f](facebook/react@f93f3402f)**: Make useEffect(async) warning more verbose (#14327) //<Dan Abramov>//
- **[ee3ef3a07](facebook/react@ee3ef3a07)**: Fix regression: Errors not emitted in streams (#14314) //<Pelle Wessman>//
- **[33f6f5e53](facebook/react@33f6f5e53)**: Remove usage of `fbjs/lib/invariant` in ReactNativeViewConfigRegistry. (#14330) //<Christoph Nakazawa>//
- **[686f1060a](facebook/react@686f1060a)**: Publish a local release (canary or stable) to NPM (#14260) //<Brian Vaughn>//
- **[7475120ce](facebook/react@7475120ce)**: Prevent deopts from modifying exports object in stable builds (#14309) //<Dan Abramov>//
- **[0c7189d92](facebook/react@0c7189d92)**: Fix resolution of outer props with React.memo() (#14312) //<Dan Abramov>//
- **[14be29b2b](facebook/react@14be29b2b)**: Add more test coverage for nested memo() (#14311) //<Dan Abramov>//
- **[dc0dd4bbf](facebook/react@dc0dd4bbf)**: Use |0 to coerce to number (#14297) //<Dan Abramov>//
- **[dd8205cef](facebook/react@dd8205cef)**: List ignored types instead of included types in the stack (#14308) //<Dan Abramov>//
- **[a9fdf8a32](facebook/react@a9fdf8a32)**: Warn about reassigning this.props (#14277) //<Dan Abramov>//
- **[327cf0ee3](facebook/react@327cf0ee3)**: Fix support for mixing react-dom/[email protected] and react@<16.6 (#14291) //<Dan Abramov>//
- **[c954efa70](facebook/react@c954efa70)**: Remove `import * as` pattern from the codebase (#14282) //<Sebastian Markbåge>//
- **[ccb14e270](facebook/react@ccb14e270)**: Fix SSR useCallback in render phase (#14279) //<Dan Abramov>//
- **[0e9cb3f5d](facebook/react@0e9cb3f5d)**: Clear fields on unmount of fiber to avoid memory leak (#14276) //<Dominic Gannaway>//
- **[592676503](facebook/react@592676503)**: Revert "Clear memoizedState on unmount of fiber to avoid memory leak (#14218)" (#14275) //<Dominic Gannaway>//
- **[9b2fb24f9](facebook/react@9b2fb24f9)**: Clear memoizedState on unmount of fiber to avoid memory leak (#14218) //<Dominic Gannaway>//
- **[a22fabc2a](facebook/react@a22fabc2a)**: Reduce scheduler serialization overhead (#14249) //<Jason Miller>//
- **[21d5f7d32](facebook/react@21d5f7d32)**: Wrap shorthand CSS property collision warning in feature flag (#14245) //<Andrew Clark>//
- **[8feeed10d](facebook/react@8feeed10d)**: [scheduler] Remove window.postMessage fallback //<Andrew Clark>//
- **[5bce0ef10](facebook/react@5bce0ef10)**: [scheduler] Post to MessageChannel instead of window (#14234) //<Andrew Clark>//
- **[f55795c8e](facebook/react@f55795c8e)**: Add regression test for #14188 (#14197) //<Dan Abramov>//
- **[b98adb648](facebook/react@b98adb648)**: Simplify CSS shorthand property warning (#14183) //<Sophie Alpert>//
- **[f8bfd5868](facebook/react@f8bfd5868)**: fix typo //<Sebastian Markbage>//
- **[961eb65b4](facebook/react@961eb65b4)**: Use unique thread ID for each partial render to access Context (#14182) //<Sebastian Markbåge>//
- **[1a6ab1e9b](facebook/react@1a6ab1e9b)**: SimpleMemoComponent should warn if a ref is given (#14178) //<Sophie Alpert>//
- **[8ae867e6b](facebook/react@8ae867e6b)**: Warn about conflicting style values during updates (#14181) //<Sophie Alpert>//
- **[d5e1bf07d](facebook/react@d5e1bf07d)**: Renamed outdated schedule/tracing referecnes (#14177) //<Brian Vaughn>//
- **[2dd4ba11e](facebook/react@2dd4ba11e)**: ESlint -> ESLint //<Andrew Clark>//
- **[9cc631a53](facebook/react@9cc631a53)**: Don't run danger on bad build (#14143) //<Sophie Alpert>//
- **[1034e26fe](facebook/react@1034e26fe)**: Fix typos (#14124) //<Heaven>//
- **[5618da49d](facebook/react@5618da49d)**: Fix comment typo (#14156) //<Bartosz Gordon>//
- **[9fb919945](facebook/react@9fb919945)**: Add global to ESLint plugin bundle config //<Andrew Clark>//
- **[c174f8592](facebook/react@c174f8592)**: Add fb build of ESLint plugin (#14165) //<Andrew Clark>//
- **[02e4848e3](facebook/react@02e4848e3)**: Improved suspense support in ReactDOMServer (#14161) //<Alex Taylor>//
- **[4b163fe](facebook/react@4b163fee1)**: Remove errant return assignment (#14164) //<Andrew Clark>//
- **[e58ecda9a](facebook/react@e58ecda9a)**: Suspense fuzz tester (#14147) //<Andrew Clark>//
- **[7fd1661f8](facebook/react@7fd1661f8)**:  Don't warn if an unmounted component is pinged (#14158) //<Andrew Clark>//
- **[f9e9913f0](facebook/react@f9e9913f0)**: [Synchronous Suspense] Don't delete children of suspended component (#14157) //<Andrew Clark>//
- **[7c560131b](facebook/react@7c560131b)**: Adding logger pri (#14155) //<Nathan Schloss>//
- **[3d8bda70e](facebook/react@3d8bda70e)**: Refactor ESLint configuration to enable better IDE integration (#13914) //<Minh Nguyen>//
- **[051272f20](facebook/react@051272f20)**: Use Entry in `yarn build ...` Instead of Label (#14148) //<Sebastian Markbåge>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions 3ff2c7c...6bf5e85

Reviewed By: bvaughn

Differential Revision: D13288288

fbshipit-source-id: 89a4837a9198c53fc79306933f589ef25d8bb4b6
kelset pushed a commit that referenced this pull request Dec 12, 2018
Summary:
@public
This sync includes the following changes:
- **[6bf5e8598](facebook/react@6bf5e8598)**: Fix scheduler setTimeout() re-entrancy check (#14384) //<Brian Vaughn>//
- **[7a48c900b](facebook/react@7a48c900b)**: Prevent a v8 deopt when profiling (#14383) //<Brian Vaughn>//
- **[f00c2755b](facebook/react@f00c2755b)**: Removed unnecessary externals from Jest bundles (#14372) //<Brian Vaughn>//
- **[52bea95cf](facebook/react@52bea95cf)**: Fixed scheduler setTimeout fallback (#14358) //<Brian Vaughn>//
- **[1d25aa578](facebook/react@1d25aa578)**: [Fizz] New Server Rendering Infra (#14144) //<Sebastian Markbåge>//
- **[f1bf28160](facebook/react@f1bf28160)**: Fix bug in cloneHook (#14364) //<Imre Osswald>//
- **[16e120438](facebook/react@16e120438)**: [Fire] Add initial build infrastructure (#14359) //<Dan Abramov>//
- **[d14ba87b1](facebook/react@d14ba87b1)**: Validate propTypes for lazy() and memo() and warn about invalid patterns (#14298) //<Dan Abramov>//
- **[4f964f09c](facebook/react@4f964f09c)**: Adding isMemo check to react-is package (#14313) //<Jinto Jose>//
- **[c2a2d8a53](facebook/react@c2a2d8a53)**: Remove useMutationEffect (#14336) //<Sophie Alpert>//
- **[48f1e5b3c](facebook/react@48f1e5b3c)**: Add a null type test for memo (#14325) //<chun shang>//
- **[f93f3402f](facebook/react@f93f3402f)**: Make useEffect(async) warning more verbose (#14327) //<Dan Abramov>//
- **[ee3ef3a07](facebook/react@ee3ef3a07)**: Fix regression: Errors not emitted in streams (#14314) //<Pelle Wessman>//
- **[33f6f5e53](facebook/react@33f6f5e53)**: Remove usage of `fbjs/lib/invariant` in ReactNativeViewConfigRegistry. (#14330) //<Christoph Nakazawa>//
- **[686f1060a](facebook/react@686f1060a)**: Publish a local release (canary or stable) to NPM (#14260) //<Brian Vaughn>//
- **[7475120ce](facebook/react@7475120ce)**: Prevent deopts from modifying exports object in stable builds (#14309) //<Dan Abramov>//
- **[0c7189d92](facebook/react@0c7189d92)**: Fix resolution of outer props with React.memo() (#14312) //<Dan Abramov>//
- **[14be29b2b](facebook/react@14be29b2b)**: Add more test coverage for nested memo() (#14311) //<Dan Abramov>//
- **[dc0dd4bbf](facebook/react@dc0dd4bbf)**: Use |0 to coerce to number (#14297) //<Dan Abramov>//
- **[dd8205cef](facebook/react@dd8205cef)**: List ignored types instead of included types in the stack (#14308) //<Dan Abramov>//
- **[a9fdf8a32](facebook/react@a9fdf8a32)**: Warn about reassigning this.props (#14277) //<Dan Abramov>//
- **[327cf0ee3](facebook/react@327cf0ee3)**: Fix support for mixing react-dom/[email protected] and react@<16.6 (#14291) //<Dan Abramov>//
- **[c954efa70](facebook/react@c954efa70)**: Remove `import * as` pattern from the codebase (#14282) //<Sebastian Markbåge>//
- **[ccb14e270](facebook/react@ccb14e270)**: Fix SSR useCallback in render phase (#14279) //<Dan Abramov>//
- **[0e9cb3f5d](facebook/react@0e9cb3f5d)**: Clear fields on unmount of fiber to avoid memory leak (#14276) //<Dominic Gannaway>//
- **[592676503](facebook/react@592676503)**: Revert "Clear memoizedState on unmount of fiber to avoid memory leak (#14218)" (#14275) //<Dominic Gannaway>//
- **[9b2fb24f9](facebook/react@9b2fb24f9)**: Clear memoizedState on unmount of fiber to avoid memory leak (#14218) //<Dominic Gannaway>//
- **[a22fabc2a](facebook/react@a22fabc2a)**: Reduce scheduler serialization overhead (#14249) //<Jason Miller>//
- **[21d5f7d32](facebook/react@21d5f7d32)**: Wrap shorthand CSS property collision warning in feature flag (#14245) //<Andrew Clark>//
- **[8feeed10d](facebook/react@8feeed10d)**: [scheduler] Remove window.postMessage fallback //<Andrew Clark>//
- **[5bce0ef10](facebook/react@5bce0ef10)**: [scheduler] Post to MessageChannel instead of window (#14234) //<Andrew Clark>//
- **[f55795c8e](facebook/react@f55795c8e)**: Add regression test for #14188 (#14197) //<Dan Abramov>//
- **[b98adb648](facebook/react@b98adb648)**: Simplify CSS shorthand property warning (#14183) //<Sophie Alpert>//
- **[f8bfd5868](facebook/react@f8bfd5868)**: fix typo //<Sebastian Markbage>//
- **[961eb65b4](facebook/react@961eb65b4)**: Use unique thread ID for each partial render to access Context (#14182) //<Sebastian Markbåge>//
- **[1a6ab1e9b](facebook/react@1a6ab1e9b)**: SimpleMemoComponent should warn if a ref is given (#14178) //<Sophie Alpert>//
- **[8ae867e6b](facebook/react@8ae867e6b)**: Warn about conflicting style values during updates (#14181) //<Sophie Alpert>//
- **[d5e1bf07d](facebook/react@d5e1bf07d)**: Renamed outdated schedule/tracing referecnes (#14177) //<Brian Vaughn>//
- **[2dd4ba11e](facebook/react@2dd4ba11e)**: ESlint -> ESLint //<Andrew Clark>//
- **[9cc631a53](facebook/react@9cc631a53)**: Don't run danger on bad build (#14143) //<Sophie Alpert>//
- **[1034e26fe](facebook/react@1034e26fe)**: Fix typos (#14124) //<Heaven>//
- **[5618da49d](facebook/react@5618da49d)**: Fix comment typo (#14156) //<Bartosz Gordon>//
- **[9fb919945](facebook/react@9fb919945)**: Add global to ESLint plugin bundle config //<Andrew Clark>//
- **[c174f8592](facebook/react@c174f8592)**: Add fb build of ESLint plugin (#14165) //<Andrew Clark>//
- **[02e4848e3](facebook/react@02e4848e3)**: Improved suspense support in ReactDOMServer (#14161) //<Alex Taylor>//
- **[4b163fe](facebook/react@4b163fee1)**: Remove errant return assignment (#14164) //<Andrew Clark>//
- **[e58ecda9a](facebook/react@e58ecda9a)**: Suspense fuzz tester (#14147) //<Andrew Clark>//
- **[7fd1661f8](facebook/react@7fd1661f8)**:  Don't warn if an unmounted component is pinged (#14158) //<Andrew Clark>//
- **[f9e9913f0](facebook/react@f9e9913f0)**: [Synchronous Suspense] Don't delete children of suspended component (#14157) //<Andrew Clark>//
- **[7c560131b](facebook/react@7c560131b)**: Adding logger pri (#14155) //<Nathan Schloss>//
- **[3d8bda70e](facebook/react@3d8bda70e)**: Refactor ESLint configuration to enable better IDE integration (#13914) //<Minh Nguyen>//
- **[051272f20](facebook/react@051272f20)**: Use Entry in `yarn build ...` Instead of Label (#14148) //<Sebastian Markbåge>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions 3ff2c7c...6bf5e85

Reviewed By: bvaughn

Differential Revision: D13288288

fbshipit-source-id: 89a4837a9198c53fc79306933f589ef25d8bb4b6
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
Summary:
@public
This sync includes the following changes:
- **[6bf5e8598](facebook/react@6bf5e8598)**: Fix scheduler setTimeout() re-entrancy check (facebook#14384) //<Brian Vaughn>//
- **[7a48c900b](facebook/react@7a48c900b)**: Prevent a v8 deopt when profiling (facebook#14383) //<Brian Vaughn>//
- **[f00c2755b](facebook/react@f00c2755b)**: Removed unnecessary externals from Jest bundles (facebook#14372) //<Brian Vaughn>//
- **[52bea95cf](facebook/react@52bea95cf)**: Fixed scheduler setTimeout fallback (facebook#14358) //<Brian Vaughn>//
- **[1d25aa578](facebook/react@1d25aa578)**: [Fizz] New Server Rendering Infra (facebook#14144) //<Sebastian Markbåge>//
- **[f1bf28160](facebook/react@f1bf28160)**: Fix bug in cloneHook (facebook#14364) //<Imre Osswald>//
- **[16e120438](facebook/react@16e120438)**: [Fire] Add initial build infrastructure (facebook#14359) //<Dan Abramov>//
- **[d14ba87b1](facebook/react@d14ba87b1)**: Validate propTypes for lazy() and memo() and warn about invalid patterns (facebook#14298) //<Dan Abramov>//
- **[4f964f09c](facebook/react@4f964f09c)**: Adding isMemo check to react-is package (facebook#14313) //<Jinto Jose>//
- **[c2a2d8a53](facebook/react@c2a2d8a53)**: Remove useMutationEffect (facebook#14336) //<Sophie Alpert>//
- **[48f1e5b3c](facebook/react@48f1e5b3c)**: Add a null type test for memo (facebook#14325) //<chun shang>//
- **[f93f3402f](facebook/react@f93f3402f)**: Make useEffect(async) warning more verbose (facebook#14327) //<Dan Abramov>//
- **[ee3ef3a07](facebook/react@ee3ef3a07)**: Fix regression: Errors not emitted in streams (facebook#14314) //<Pelle Wessman>//
- **[33f6f5e53](facebook/react@33f6f5e53)**: Remove usage of `fbjs/lib/invariant` in ReactNativeViewConfigRegistry. (facebook#14330) //<Christoph Nakazawa>//
- **[686f1060a](facebook/react@686f1060a)**: Publish a local release (canary or stable) to NPM (facebook#14260) //<Brian Vaughn>//
- **[7475120ce](facebook/react@7475120ce)**: Prevent deopts from modifying exports object in stable builds (facebook#14309) //<Dan Abramov>//
- **[0c7189d92](facebook/react@0c7189d92)**: Fix resolution of outer props with React.memo() (facebook#14312) //<Dan Abramov>//
- **[14be29b2b](facebook/react@14be29b2b)**: Add more test coverage for nested memo() (facebook#14311) //<Dan Abramov>//
- **[dc0dd4bbf](facebook/react@dc0dd4bbf)**: Use |0 to coerce to number (facebook#14297) //<Dan Abramov>//
- **[dd8205cef](facebook/react@dd8205cef)**: List ignored types instead of included types in the stack (facebook#14308) //<Dan Abramov>//
- **[a9fdf8a32](facebook/react@a9fdf8a32)**: Warn about reassigning this.props (facebook#14277) //<Dan Abramov>//
- **[327cf0ee3](facebook/react@327cf0ee3)**: Fix support for mixing react-dom/[email protected] and react@<16.6 (facebook#14291) //<Dan Abramov>//
- **[c954efa70](facebook/react@c954efa70)**: Remove `import * as` pattern from the codebase (facebook#14282) //<Sebastian Markbåge>//
- **[ccb14e270](facebook/react@ccb14e270)**: Fix SSR useCallback in render phase (facebook#14279) //<Dan Abramov>//
- **[0e9cb3f5d](facebook/react@0e9cb3f5d)**: Clear fields on unmount of fiber to avoid memory leak (facebook#14276) //<Dominic Gannaway>//
- **[592676503](facebook/react@592676503)**: Revert "Clear memoizedState on unmount of fiber to avoid memory leak (facebook#14218)" (facebook#14275) //<Dominic Gannaway>//
- **[9b2fb24f9](facebook/react@9b2fb24f9)**: Clear memoizedState on unmount of fiber to avoid memory leak (facebook#14218) //<Dominic Gannaway>//
- **[a22fabc2a](facebook/react@a22fabc2a)**: Reduce scheduler serialization overhead (facebook#14249) //<Jason Miller>//
- **[21d5f7d32](facebook/react@21d5f7d32)**: Wrap shorthand CSS property collision warning in feature flag (facebook#14245) //<Andrew Clark>//
- **[8feeed10d](facebook/react@8feeed10d)**: [scheduler] Remove window.postMessage fallback //<Andrew Clark>//
- **[5bce0ef10](facebook/react@5bce0ef10)**: [scheduler] Post to MessageChannel instead of window (facebook#14234) //<Andrew Clark>//
- **[f55795c8e](facebook/react@f55795c8e)**: Add regression test for facebook#14188 (facebook#14197) //<Dan Abramov>//
- **[b98adb648](facebook/react@b98adb648)**: Simplify CSS shorthand property warning (facebook#14183) //<Sophie Alpert>//
- **[f8bfd5868](facebook/react@f8bfd5868)**: fix typo //<Sebastian Markbage>//
- **[961eb65b4](facebook/react@961eb65b4)**: Use unique thread ID for each partial render to access Context (facebook#14182) //<Sebastian Markbåge>//
- **[1a6ab1e9b](facebook/react@1a6ab1e9b)**: SimpleMemoComponent should warn if a ref is given (facebook#14178) //<Sophie Alpert>//
- **[8ae867e6b](facebook/react@8ae867e6b)**: Warn about conflicting style values during updates (facebook#14181) //<Sophie Alpert>//
- **[d5e1bf07d](facebook/react@d5e1bf07d)**: Renamed outdated schedule/tracing referecnes (facebook#14177) //<Brian Vaughn>//
- **[2dd4ba11e](facebook/react@2dd4ba11e)**: ESlint -> ESLint //<Andrew Clark>//
- **[9cc631a53](facebook/react@9cc631a53)**: Don't run danger on bad build (facebook#14143) //<Sophie Alpert>//
- **[1034e26fe](facebook/react@1034e26fe)**: Fix typos (facebook#14124) //<Heaven>//
- **[5618da49d](facebook/react@5618da49d)**: Fix comment typo (facebook#14156) //<Bartosz Gordon>//
- **[9fb919945](facebook/react@9fb919945)**: Add global to ESLint plugin bundle config //<Andrew Clark>//
- **[c174f8592](facebook/react@c174f8592)**: Add fb build of ESLint plugin (facebook#14165) //<Andrew Clark>//
- **[02e4848e3](facebook/react@02e4848e3)**: Improved suspense support in ReactDOMServer (facebook#14161) //<Alex Taylor>//
- **[4b163fe](facebook/react@4b163fee1)**: Remove errant return assignment (facebook#14164) //<Andrew Clark>//
- **[e58ecda9a](facebook/react@e58ecda9a)**: Suspense fuzz tester (facebook#14147) //<Andrew Clark>//
- **[7fd1661f8](facebook/react@7fd1661f8)**:  Don't warn if an unmounted component is pinged (facebook#14158) //<Andrew Clark>//
- **[f9e9913f0](facebook/react@f9e9913f0)**: [Synchronous Suspense] Don't delete children of suspended component (facebook#14157) //<Andrew Clark>//
- **[7c560131b](facebook/react@7c560131b)**: Adding logger pri (facebook#14155) //<Nathan Schloss>//
- **[3d8bda70e](facebook/react@3d8bda70e)**: Refactor ESLint configuration to enable better IDE integration (facebook#13914) //<Minh Nguyen>//
- **[051272f20](facebook/react@051272f20)**: Use Entry in `yarn build ...` Instead of Label (facebook#14148) //<Sebastian Markbåge>//

Release Notes:
[GENERAL] [FEATURE] [React] - React sync for revisions 3ff2c7c...6bf5e85

Reviewed By: bvaughn

Differential Revision: D13288288

fbshipit-source-id: 89a4837a9198c53fc79306933f589ef25d8bb4b6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Platform: iOS iOS applications.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants