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

move react-dom to flow-typed #3716

Merged
merged 2 commits into from
Jan 31, 2020
Merged

move react-dom to flow-typed #3716

merged 2 commits into from
Jan 31, 2020

Conversation

jbrown215
Copy link
Contributor

  • Type of contribution: new definition
    Other notes:

This is verbatim the Flow definitions. I also moved the relevant tests to flow-typed.

We're keeping the Synthetic*Event types in Flow for now. We will need to keep the $JSXIntrinsics in Flow forever, since we use that type internally in our type checking.

These types will be moved out of Flow as early as 0.118, but might not make the cut until 0.119.

On the Flow side, I added a test where we have a flow-typed/npm/react-dom_v16.x.x.js with this exact definition and I ensure that we have access both to types in react-dom.js in Flow and react-dom_v16.x.x.js from flow-typed.

@pascalduez
Copy link
Member

pascalduez commented Jan 31, 2020

Out of curiosity, what's motivating the move?

Edit: pasting discord reply here for reference.

It's been a longstanding request from the React team. Getting them out of Flow also reduces our own surface area. At some point, I think React wants to ship their own libdefs so that they can be versioned separately from the flow version

@pascalduez pascalduez merged commit b2693c1 into flow-typed:master Jan 31, 2020
facebook-github-bot pushed a commit to facebook/flow that referenced this pull request Mar 19, 2020
…ibdefs

Summary:
This diff removes the react-dom modules out of Flow. They are now available on flow-typed: flow-typed/flow-typed#3716

To install the libdefs, run `flow-typed install --flow-version=0.120.0 react-dom@16.13.0`

This diff is necessary to allow React to make breaking changes to react-dom without force-pinning Flow users to the latest version of react-dom.

Reviewed By: samwgoldman

Differential Revision: D19623320

fbshipit-source-id: 0b9121ce19c696c58fbbd926ce601b1df1c9a947
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants