Enable javascript in your browser for better experience. Need to know to enable it? Go here.
Last updated : Oct 27, 2021
Oct 2021
Adopt ? We feel strongly that the industry should be adopting these items. We use them when appropriate on our projects.

React Hooks have introduced a new approach to managing stateful logic; given React components have always been closer to functions than classes, Hooks have embraced this and brought state to the functions, instead of using classes to take function to the state with methods. Another staple of state management in React applications is Redux, and we've already noted that it has come under scrutiny, suggesting that sometimes the complexity of Redux isn't worth it and in such cases a simple approach using Hooks is preferable. Rolling this completely on your own can quickly become tricky; therefore we recommend considering a combination of React Context and the useContext and useReducer hooks, along the lines explained in this blog post.

May 2020
Adopt ? We feel strongly that the industry should be adopting these items. We use them when appropriate on our projects.

React Hooks have introduced a new approach to managing stateful logic; given React components have always been closer to functions than classes, Hooks have embraced this and brought state to the functions, instead of taking function as methods to the state with classes. Based on our experience, Hooks improve reuse of functionality among components and code readability. Given Hooks’ testability improvements, using React Test Renderer and React Testing Library, and their growing community support, we consider them our approach of choice.

Nov 2019
Trial ? Worth pursuing. It is important to understand how to build up this capability. Enterprises should try this technology on a project that can handle the risk.

Earlier this year, React Hooks were introduced to the popular JavaScript framework. They make it possible to use state and other React features without writing a class, offering a cleaner approach than higher-order components or render-props for use cases. Libraries such as Material UI and Apollo have already switched to using Hooks. There are some issues with testing Hooks, especially with Enzyme, which contributed to our reassessment of Enzyme as the tool of choice.

Published : Nov 20, 2019
Radar

Download Technology Radar Volume 25

English | Español | Português | 中文

Radar

Stay informed about technology

 

Subscribe now

Visit our archive to read previous volumes