React hooks useEffect and useCallback are a headache for developers

0
18
React hooks useEffect and useCallback are a headache for developers


The team behind the annual State of JavaScript study has published the results of the first State of React. More than 13,000 developers participated in the survey last year. The study shows that they are both happy to update their React version and accept the latest features well. However, one of the difficulties is hooks useEffect And useCallback. The JavaScript library React, which is evolving toward the full stack, is still most commonly used for single-page apps.

Advertisement


The survey team found out which metaframeworks respondents use with React and whether they would like to use them again. About 92 percent of participants have already used Create React App. 76 percent have experience with Next.js, 15 percent with Gatsby, 12 percent with Astro, and 9 percent with Remix.

However, the popularity of the frameworks differs: 39 percent would like to use Next.js again, putting the framework in first place by a large margin, while Create React App only achieved 13 percent. It is followed by Astro (12 percent), Remix (9 percent) and Redwood (6 percent), as well as Gatsby at the bottom with 6 percent.

The study makers say that Create React App is officially considered obsolete (outdated) and received its last update in 2022.



EnterJS React 19 Day, Online Conference, October 17, 2024

The online conference will be presented on October 17, 2024 Feedback 19 days New features of the popular JavaScript library from dpunkt.verlag and iX. As part of the theme day EnterJS Shows participants how they can make the most of the new version and how modern web development with React 19 improves their applications. Excerpt from the event:

early bird tickets Available till 25th September.

Fear and doubt over Kamala Harris’ close ties with Silicon Valley eliteFear and doubt over Kamala Harris’ close ties with Silicon Valley elite

Hooks have been available to use in React since 2018. 99 percent of people surveyed use it useStateand only less than two percent rate it negatively. Other most used React features are useEffect, , useRef And useContextWhere? received the highest approval rate of 57 percent.


State of React 2023: The five most used React features

State of React 2023: The five most used React features

The five most used React features

(Picture: Feedback Status 2023,

However, difficulties also arise when using APIs and hooks. So the biggest problem among APIs are children forwardRef with 27 percent, memo with 22 percent and the reference API with 21 percent. Of the new APIs, React Server Components are proving to be the biggest challenge, called a “pain point” by 24 percent of those surveyed.

Regarding thorns and stings useEffect with 37 per cent and useCallback Negative at 15 percent, which, according to the study, is mainly due to the management of dependency arrays.

In addition to React’s own features, inquiries were also made about popular tools and libraries. For data visualization, 45 percent of those surveyed use the D3 library, followed by ReCharts in second place with 29 percent. Nivo comes in third place with a wide margin and 7 percent. Among CSS tools and libraries, Tailwind comes in first place, slightly ahead of CSS Styled Components – with 67 percent each, a difference of only ten people.

But why do developers still use React? The study also examined this question. React is still primarily used for single-page applications (SPAs) (86 percent). Server-side rendering (SSR) follows at 63 percent. Static site generation (SSG) comes in third, with half of those surveyed using React.


State of React 2023: Most common uses of React

State of React 2023: Most common uses of React

Most common uses of React

(Picture: Feedback Status 2023,

prophesied in this sense Study ConclusionThere may be two forms of React in 2028 that are used with roughly equal frequency: a full-stack version with server components and server actions, and a purely client-side single-page app version.

The “State of React 2023” study was conducted by the collective from October 27 to November 15, 2023. Demographics was done. The study team points out that React 19 had not been announced at that time. However, the React developers surveyed seemed happy to update: of the 9,500 people who provided information about the version they used, 69 percent used the current major version React 18.x and two percent also used the Canary build. A total of 13,003 people participated in the survey, although the sub-questions were sometimes answered by significantly fewer people.

The results of the study are can be seen on the official website,


(May)

Microsoft and EU clash over global computer failure that brought airports and banks to a standstillMicrosoft and EU clash over global computer failure that brought airports and banks to a standstill

LEAVE A REPLY

Please enter your comment!
Please enter your name here