Closed mikabytes closed 7 months ago
Confirmed that specifying them manually in config solves the issue.
.importjs.js
module.exports = {
namedExports: {
'react': ['useState', 'useEffect', 'useContext', 'useReducer', 'useCallback', 'useMemo', 'useRef', 'useImperativeMethods', 'useLayoutEffect']
}
}
can it just work as well, but not set the namedExports config ?
Well, not at the time when I created this issue. I have since stopped using React, so I don't know if it has been solved since then.
This is still an issue with React 18.2
and ImportJS 5.1
. It just can't determine that the react
module exports those methods for some reason.
Pretty sure this is due to #344
Closing this in favor of keeping discussion over there.
useContext
doesn't get imported. If I use fixWord, it says No JS module to import foruseContext
However when I add it manuallly all works just fine.
This is using React 16.7.0-alpha.2