React: it's technically backwards compatible!
jamesknelson.com
React: it's technically backwards compatible!
1–4 of 4 posts
Re: React: it's technically backwards compatible!
#2What problems do hooks solve better than composition or hoc?
I really haven’t kept up with react, when I last used it 6 months ago I started with the same boilerplate I made in 2017. Could it be things are being added to react that are unnecessary for most small and medium sized apps? I got that feeling when I saw react router 4. At least v6 is moving back towards a simplier api.
Re: React: it's technically backwards compatible!
#3Interesting that you compare them to mixins, which the react team considered harmful and removed. What problems do hooks solve better than composition or hoc? I really haven’t kept up with react, when I last used it 6 months ago I started with the same boilerplate I made in 2017. Could it be things are being added to react that are unnecessary for most small and medium sized apps? I got that feeling when I saw react…
Hooks allow a way to abstract all that logic that used to require a component to house it. Components should still only really care about JSX, any logic more complex than an IF statement can live in functions or hooks.
Re: React: it's technically backwards compatible!
#4Interesting that you compare them to mixins, which the react team considered harmful and removed. What problems do hooks solve better than composition or hoc? I really haven’t kept up with react, when I last used it 6 months ago I started with the same boilerplate I made in 2017. Could it be things are being added to react that are unnecessary for most small and medium sized apps? I got that feeling when I saw react…
Before hooks, it was really common to write container / component pairs. The wrapper would have to be a class component with state and lifecycle hooks, and the inner component would only concern itself with presentation. IIRC, this was recommended in the react docs, although I've seen more than a few people misunderstand this pattern. Hooks allow a way to abstract all that logic that used to require a component to ho…