Closed gerardcsaperas closed 2 years ago
Shouldn't I be able to import
useEffect
normally?
You're using preact 8, it doesn't have hooks yet
"preact": "^8.5.3",
If you update to preact 10 you can use hooks (and also change the alias from preact-compat
to preact/compat
in your webpack config)
Describe the bug I can't import
useEffect
frompreact/hooks
:The error is as follows:
To Reproduce
I created a preact project with TypeScript and webpack and the following configurations:
Expected behavior Shouldn't I be able to import
useEffect
normally?Thank you in advance for your time.
Kind Regards,
Gerard