github facebook/flow v0.286.0

8 hours ago

Breaking Changes:

  • Starting from this version, flow-bin will only contain ARM64 binaries for macOS.

Likely to cause new Flow errors:

  • Flow now errors on constant conditions and invalid comparisons. example
  • Flow will no longer infer an unsound type for array and object literals passed to a general function. example
  • React.ElementConfig<...> and React.PropsOf<...> will now always include the ref prop in the props object type.
  • The config option for an earlier mode react.ref_as_prop=partial_support is removed, and Flow now has better support for React 19's ref-as-prop behavior:
    1. All the ref prop in component syntax components must be made optional
    2. You might need to rewrite some of your higher order components. e.g. previously an identity HOC must be written as
declare function id<Props: {...}, Ref>(c: component(ref?: Ref, ...Props)): component(ref?: Ref...Props)

now it must be written as

declare function id<Props: {...}>(c: component(...Props)): component(...Props)

Don't miss a new flow release

NewReleases is sending notifications on new releases.