After defining React as a global variable, I added these lines to my global declarations
import type { React as ReactType } from 'react';
declare var React : ReactType;
After this, Flow no longer complains about not being able to resolve the React identifier, however all PropType checking is disabled.
How can I tell Flow that React is a globally defined import?
You can use the following to declare a global for React.
declare var React: $Exports<'react'>;
God it took me hours/days to find this issue! Huge thumbs up to @aackerman :+1:
Most helpful comment
You can use the following to declare a global for React.