|
|
|
|
|
by gotofritz
2247 days ago
|
|
> hooks don't have an obvious context. I mean, that's the whole point of hooks... they get the context of whatever host function scope they are in. That's why the 'reusable logic' spiel. So if you create a useLocalStorage hook, for example, you can then plug it into any function component and it will use. It's as if each function was an invisible class, with an invisible this.state |
|