This fails
const Foo = ({b, c}: {b: boolean, c: string}) => {
return <div>{b ? 'true' : 'false'}</div>
}
const Bar = () => {
const fooProps = {c: 'asdf'}
return <Foo {...fooProps} b />
}
โฏ flow
props4.js:9
9: return <Foo {...fooProps} b />
^^^^^^^^^^^^^^^^^^^^^^^ React element `Foo`
3: const Foo = ({b, c}: {b: boolean, c: string}) => {
^^^^^^^ boolean. This type is incompatible with
9: return <Foo {...fooProps} b />
^
but if you do
const Foo = ({b, c}: {b: boolean, c: string}) => {
return <div>{b ? 'true' : 'false'}</div>
}
const Bar = () => {
const fooProps = {c: 'asdf'}
return <Foo {...fooProps} b={true} />
}
That works. So something with having an implied true value breaks the checker
Same issue here. probably related to #2623
Here is a minimal example on the "Try" page showing the issue:

I think it should be tagged with react and bug tags.
So the original case is now fixed, but @DrewML 's test case still errors.
Looks like that case is now passing as of Flow 0.53:
import * as React from 'react';
const defaultProps = {
a: false
}
const ABC = function({b}: {b: bool}): React.Element<any> {
return <div></div>
};
var foo = <ABC {...defaultProps} b />;
Most helpful comment
Here is a minimal example on the "Try" page showing the issue: