The included index.d.ts file should also include the global React instance. Without it, TypeScript complains that 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.. Then I have to manually import * as React from 'react'; to silence the error.
The included index.d.ts file should also include the global React instance. Without it, TypeScript complains that
'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.
. Then I have to manuallyimport * as React from 'react';
to silence the error.