3 ms·
Hooks are a natural progression from class components, class components seem more straightforward with all the willMount beforeMount etc. but they trick you int
by ericmcer 4y ago
Hooks are a natural progression from class components, class components seem more straightforward with all the willMount beforeMount etc. but they trick you into visualizing your component in different states of mounted/rendered/etc. That goes against what React wants to be at its core, which is totally immutable and pure, it isn't mounted or pre/post-render it looks the same whether it is the first render or the 100th. Ultimately I think the mental model of the component as a pure function is superior to juggling the react lifecycle.
- deleted 4y ago[deleted]