github facebook/flow v0.249.0

11 hours ago

Likely to cause new Flow errors:

  • Uses of React$AbstractComponent outside library definitions will now trigger internal-type lint error, which is on by default. React.AbstractComponent is also marked as deprecated. We recommend replacing them with component types. We have provided a codemod via the flow-upgrade package to aid larger codebases with this conversion: yarn run flow-codemod eliminateAbstractComponent path/to/src.

Notable bug fixes:

  • Fixed issue with StringPrefix and StringSuffix when used as a component syntax prop.
  • Fixed an issue that causes type argument inference on component type to be incorrectly under-constrained. (example)
  • Fixed as cast support in flow-remove-types.

Library Definitions:

  • React string refs are no longer supported in React.cloneElement. e.g. React.cloneElement(e, {ref: 'foo'}) will be an error.
  • The deprecated React$Ref type and various aliases of it are removed.

Don't miss a new flow release

NewReleases is sending notifications on new releases.