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<...>
andReact.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:- All the ref prop in component syntax components must be made optional
- 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)