4 ms·
I’m sure the parent author knows this But the beauty of hooks is as you say reusable statefull behavior. It also lets you treat your functional components more
by bern4444 5y ago
I’m sure the parent author knows this
But the beauty of hooks is as you say reusable statefull behavior. It also lets you treat your functional components more like a pure function in my opinion.
If the hooks you use are poorly designed, then yeah, it may be more difficult. But well designed and implemented hooks make your component appear more like a pure function.
The state is (more) decoupled from the UI code than before and lets me easily reuse behaviors across components.