Closed karthikcodes6 closed 4 years ago
It's not a hook but a static method, which is called, for example, here.
Anyway, as per the react hook rules. Hooks cannot be used inside the class component. Then how you implemented here?
It's not used, it's just declared. And used in other places
I'm still confused. How can we even declare hook inside the class. Since it's prohibited to do so by the official react team itself. It'll be more helpful if you can explain/give some resources about how it works.
@karthikeyan676 you should probably read about static instances
Sure. Thanks!
💬 Question
Hi team, I have only one question. I just saw the source code of KittenTricks that I get to know you're using hooks inside the class component. Can anyone tell me how is it possible? I'm posting the code for your reference