4 ms·
You absolutely can create abstractions where a hook calls another hook. It is perhaps the single most useful change hooks have given me. Of course you need to
by Normal_gaussian 7y ago
You absolutely can create abstractions where a hook calls another hook. It is perhaps the single most useful change hooks have given me.
Of course you need to follow the same rules in the hook (always call every hook it calls, in the same order, so you don't mess up the order above).
- bcheung 7y agoNot inside of useEffect.
- Normal_gaussian 7y agoYes, you're right with that. Its curious that I haven't found that to be a pain point.