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

Bring ReactFabricHostComponent back to react-native #36570

Closed
wants to merge 1 commit into from

Commits on Mar 22, 2023

  1. Bring ReactFabricHostComponent back to react-native

    Summary:
    I'm doing some preparations to implement this proposal to bring some DOM APIs to React Native refs: react-native-community/discussions-and-proposals#607
    
    To make it easier to iterate on the proposal, and to improve the separation of concerns between React and React Native, I'm moving the definition of `ReactFabricHostComponent` (the public instance provided by React when using refs on host conmponents) to the `react-native` package.
    
    I already did some steps in the React repository to simplify this:
    * Removing unused imperative events that caused increased coupling: facebook/react#26282
    * Extracting the definition of the public instance to a separate module: facebook/react#26291
    
    In this case, in order to be able to move the definition from React to React Native, we need to:
    1. Create the definition in React Native and export it through `ReactNativePrivateInterface`.
    2. Update React to use that definition instead of the one in its own module.
    
    This diff implements the first step.
    
    `ReactNativeAttributePayload` is required by this definition and by the one for Paper that still exists in React. I moved it here so we only define it where we use it when we remove Paper. Paper will access it through `ReactNativePrivateInterface` as well. That will also allow us to remove a few other fields in that interface.
    
    Changelog: [Internal]
    
    Reviewed By: yungsters
    
    Differential Revision: D43772356
    
    fbshipit-source-id: 0540fb9c665a9daa4d978926e0d01081f8541ffe
    rubennorte authored and facebook-github-bot committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    826d0f8 View commit details
    Browse the repository at this point in the history