Compatible with react hooks #4315
-
How to be compatible with react hooks? From the case given on the official website, after adding alias, I found that useEffect cannot be found. Do I need to install other packages to achieve compatibility? |
Beta Was this translation helpful? Give feedback.
Answered by
rschristian
Mar 21, 2024
Replies: 1 comment 7 replies
-
Sounds like you didn't set up the react alias properly. What did you point it to? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm 99% sure you're using
preact-compat
, instead of the correctpreact/compat
, in your aliases.preact-compat
is legacy, for Preact v8 and older.preact/compat
is the modern location of compat.