Re:Common mistakes writing React components with hooks
by duxup on Tuesday July 21, 2020 @11:01AM
(#23907331)
I wondered the same but the text was also confusing so I thought maybe there was something else there.
At least for me hooks dramatically clean up the code.
Outside of error boundaries (I think those still have to be classes) any new component for me is a function component and if it needs state, has hooks.
Granted I still maintain a lot of class components back from before the days of hooks.
At least for me hooks dramatically clean up the code.
Outside of error boundaries (I think those still have to be classes) any new component for me is a function component and if it needs state, has hooks.
Granted I still maintain a lot of class components back from before the days of hooks.