"previousComponent" is never assigned a value #3270
-
The variable "previousComponent" in hooks is designed to keep track of the previous component. But it is never assigned a value. How can it keep track of the previous component ? Is this a bug ? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I wouldn't say it's a bug since it's an internal value that isn't part of any public API and setting or not setting it doesn't change the execution in any way for users. It will probably be eliminated by terser when compiling preact during the publish step. Nonetheless, as you've found out it looks like dead weight and something we can remove. Would you be open to file a PR for that? |
Beta Was this translation helpful? Give feedback.
I wouldn't say it's a bug since it's an internal value that isn't part of any public API and setting or not setting it doesn't change the execution in any way for users. It will probably be eliminated by terser when compiling preact during the publish step.
Nonetheless, as you've found out it looks like dead weight and something we can remove. Would you be open to file a PR for that?