Closed
Description
TypeScript Version: 3.8.3
Search Terms:
import preact/hooks preact/hooks/src
Code
import {h} from 'preact';
function App(): void {
const value = useMemo(() => 'Hello');
return <div>{state}</div>;
}
Run missing import fix on useMemo
.
Expected behavior:
The quick fix should add the import line
import {useMemo} from 'preact/hooks';
Actual behavior:
The quick fix actually adds the incorrect import line
import {useMemo} from 'preact/hooks/src';
This will cause the source files from Preact to be bundled instead of the transpiled files, which will cause various kinds of breakage (see preactjs/preact#1757 or preactjs/preact#1373).