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

fix: add isChildPublicInstance to ReactNativeTypes (#27788) #41807

Closed
wants to merge 2 commits into from

Commits on Dec 5, 2023

  1. Flow: make more objects exact (facebook#27790)

    Summary:
    Changelog: [Internal]
    
    This makes a couple objects more exact. Nothing critical, just noticed
    this old branch I had created when doing some Flow upgrades in the past.
    
    DiffTrain build for commit facebook/react@f498aa2.
    
    Reviewed By: hoxyq
    
    Differential Revision: D51824015
    
    Pulled By: hoxyq
    kassens authored and facebook-github-bot committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    1e5bfce View commit details
    Browse the repository at this point in the history
  2. fix: add isChildPublicInstance to ReactNativeTypes (facebook#27788)

    Summary:
    Changelog: [Internal]
    
    Follow-up on facebook/react#27783.
    
    React Native is actually using `ReactNativeTypes`, which are synced from
    this repo. In order to make `isChildPublicInstance` visible for
    renderers inside React Native repository, we need to list it in
    `ReactNativeTypes`.
    
    Because of current circular dependency between React Native and React,
    it is impossible to actually type it properly:
    - Can't import any types in `ReactNativeTypes` from local files, because
    it will break React Native, once synced.
    - Implementations can't use real types in their definitions, because it
    will break these checks:
    
    https://github.com/facebook/react/blob/223db40d5a04dc3311f963f5296675f7f43139e8/packages/react-native-renderer/fabric.js#L12-L13
    
    https://github.com/facebook/react/blob/223db40d5a04dc3311f963f5296675f7f43139e8/packages/react-native-renderer/index.js#L12-L14
    
    DiffTrain build for commit facebook/react@c29ca23.
    
    Differential Revision: D51849040
    hoxyq authored and facebook-github-bot committed Dec 5, 2023
    Configuration menu
    Copy the full SHA
    2f7cc0f View commit details
    Browse the repository at this point in the history