Closed gomesalexandre closed 5 years ago
Hey @gomesalexandre. Thanks for the feedback! Luckly, it's already supported, under experimental hook. Add the following your settings.json to "glean.experiments": ["hooksForFunctionalComponents"]
. You should get full hooks support, including useEffect
, useCallback
, in addition to what You've suggested.
Tell me what you think!
Everything is in the title :)
Instead of deleting the setState calls, we could easily move that to hooks i.e iterate through the setState calls and write their hooks equivalent at the top of the function.
I can have a look ASAP and publish a PoC PR if that's of any interest !