A Thoughtful Way To Use React’s useRef() Hook

In a React component, useState and useReducer can cause your component to re-render each time there is a call to the update functions. In this article, you will find out how to use the useRef() hook to keep track of variables without causing re-renders, and how to enforce the re-rendering of React Components. https://smashingmagazine.com/2020/11/react-useref-hook/

созданный 5y | 19 нояб. 2020 г., 12:20:20


Войдите, чтобы добавить комментарий

Другие сообщения в этой группе

Integrating Design And Code With Native Design Tokens In Penpot

The Penpot team is not slowing down on its mission to build a free design tool that not only offers powerful design features but is also well-integrated with code and modern development practices. In

8 мая 2025 г., 12:40:02 | Smashing magazine
Smashing Animations Part 1: How Classic Cartoons Inspire Modern CSS

Have you ever thought about how the limitations of early cartoon animations might relate to web design today? From looping backgrounds to minimal frame changes, these retro animation techniques have s

7 мая 2025 г., 15:40:02 | Smashing magazine
Masonry In CSS: Should Grid Evolve Or Stand Aside For A New Module?

There were duelling proposals floating around for adding support for masonry-style layouts in CSS. In one corner is a proposal that extends the existing CSS Grid specification. In the other corner is

6 мая 2025 г., 14:10:12 | Smashing magazine
How To Launch Big Complex Projects

When was the last time your project wrapped up smoothly — no delays, no surprises, no last-minute compromises? In reality, most UX projects drift as timelines slip, budgets stretch, and features morph

5 мая 2025 г., 12:40:06 | Smashing magazine
WCAG 3.0’s Proposed Scoring Model: A Shift In Accessibility Evaluation

WCAG is evolving. Since 1999, the Web Content Accessibility Guidelines have defined accessibility in binary terms: either a success criterion is met or not. But real user experience is rarely that sim

2 мая 2025 г., 12:40:13 | Smashing magazine
Make Every Day Count (May 2025 Wallpapers Edition)

The new month is just around the corner, and that means: It’s time for some new desktop wallpapers! All of them are designed with love by the community for the community and can be downloaded for free

30 апр. 2025 г., 12:10:06 | Smashing magazine
How To Turn Your Figma Designs Into Live Apps With Anima Playground

As designers, it’s important to be able to transform visual ideas into concepts within minutes and into fully functional products within hours. Well, today we’re bringing you closer to AnimaApp, an ap

29 апр. 2025 г., 12:50:07 | Smashing magazine