-
I've tried out Preact several days now (many-many years on React) but I can't find a way to prevent unnecessary re-renders. Does Preact have any concepts or APIs similar to |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I should clarify that I do not use nor plan to use |
Beta Was this translation helpful? Give feedback.
-
I decided to try Thanks @marvinhagemeister |
Beta Was this translation helpful? Give feedback.
-
Hi @gitcatrat , maybe you shouldn't feel like that, as in the end it's just something which is supported by and works on Preact as well.. But your question has made me wondering why Preact did choose to put that hook under the preact/compat package only. To be honest I hadn't even noticed that 😄 |
Beta Was this translation helpful? Give feedback.
I decided to try
memo
frompreact/compat
. I don't know why but it felt like cheating when I have to use it in Preact only project.Thanks @marvinhagemeister