With React 16.8, React Hooks are available in a stable release
1–10 of 181 posts
Re: With React 16.8, React Hooks are available in a stable release
#2Re: With React 16.8, React Hooks are available in a stable release
#3Re: With React 16.8, React Hooks are available in a stable release
#4Re: With React 16.8, React Hooks are available in a stable release
#5Never a boring day being a frontend developer. Looking forward to add hooks to my React project. The next frontier would probably be functional strongly typed languages, like Reason or some variation on Elm?
Re: With React 16.8, React Hooks are available in a stable release
#6I don't get it. I thought the main appeal of functions were that they were stateless so you had immutability. We already have classes if we want state, so why is this an improvement? Functions have slightly less overhead maybe? But then why didn't the React team just work on making classes have less overhead? It seems sort of "extra".
Re: With React 16.8, React Hooks are available in a stable release
#7I don't get it. I thought the main appeal of functions were that they were stateless so you had immutability. We already have classes if we want state, so why is this an improvement? Functions have slightly less overhead maybe? But then why didn't the React team just work on making classes have less overhead? It seems sort of "extra".
[0] https://reactjs.org/docs/hooks-intro.html
[1] https://overreacted.io/why-do-hooks-rely-on-call-order/
[2] https://dev.to/dan_abramov/making-sense-of-react-hooks-2eib
Re: With React 16.8, React Hooks are available in a stable release
#8I don't get it. I thought the main appeal of functions were that they were stateless so you had immutability. We already have classes if we want state, so why is this an improvement? Functions have slightly less overhead maybe? But then why didn't the React team just work on making classes have less overhead? It seems sort of "extra".
By using hooks the logic tidies up massively (so working on it becomes a lot quicker) and several hard to diagnose performance bottlenecks disappear.
The 'not classes' stuff is a side benefit.
Re: With React 16.8, React Hooks are available in a stable release
#9The crowd goes mild.
Re: With React 16.8, React Hooks are available in a stable release
#10I don't get it. I thought the main appeal of functions were that they were stateless so you had immutability. We already have classes if we want state, so why is this an improvement? Functions have slightly less overhead maybe? But then why didn't the React team just work on making classes have less overhead? It seems sort of "extra".
I've been working with hooks for quite a while now; its main benefit is composability - before hooks up you rely on Higher order components (HOCs, HOFs but in component rendering) to provide composability of component behaviour - this is messy, very messy, and not performant. By using hooks the logic tidies up massively (so working on it becomes a lot quicker) and several hard to diagnose performance bottlenecks disa…