Eddie Qiaoeddieqiao.hashnode.dev·Dec 3, 2024useRef, useMomouseMemo 相当于 vue2 中的computed,依赖项不变,结果不会重新计算。 import { useEffect, useMemo, useState } from "react" function SearchUserList() { console.log(111); const [users, setUsers] = useState(null) const [searchKey, setSearchKey] = useState('') us...DiscussReactHooks
Gautam panditblogbygautam.hashnode.dev·Dec 1, 2024Understanding ref in React: Why and When to Use Itn React, ref is a powerful tool that allows you to directly interact with a specific DOM element or component, bypassing React's usual declarative approach. This becomes especially useful when you need to perform a task that React's state and props m...DiscussReact
Prashant Pathakppathak.hashnode.dev·Oct 6, 2024How to Implement a Throttle Function in ReactWhen building modern web applications, controlling the rate at which certain functions are executed can be crucial, especially when dealing with performance-sensitive operations like event listeners (e.g., scroll, resize, or input events). One common...Discuss·123 readsReact
Omkar Kastureomkarkasture.hashnode.dev·Oct 5, 2024React Hooks: useEffect, useRef, and useCallbackIn last two blog we learned what are react components, props and what react hooks are. In this blog we will interact with three useful hooks namely useEffect, useRef, and useCallback with project building simultaneously. I learned this concepts from ...Discuss·9 likes·72 readsReact-Quick GuidesReact
Sainath Kadamsainathkadam.hashnode.dev·Aug 22, 2024Userefusing this we can directly manipulate the DOM. using this how? when?-> if we have to track the initial value and current value like when we want to do the reset button that time we can use the useref insead of using the useState. eg. initialise first...Discuss·1 likeuseRef
고라니드로koranidro.hashnode.dev·Aug 17, 2024[React] 당신은 상태를 필요로 하지 않을 것입니다. #2 - 보존(with. useRef) 편이 포스트는 React 버전 18.3.1을 기준으로 합니다. 이번 편은 이전 편으로부터 이어집니다. useMemo의 대안으로 useRef를 생각해 볼 수 있습니다. 이를 이용하면 결과 보존을 보장할 수 있지만 파생 상태를 운용하기 적합한 형태는 아닙니다. 부족한 점은 크게 두 가지로 생각해 볼 수 있습니다. 생성 함수를 지원하지 않습니다. 조건에 따라 연산 수행 여부를 결정하려면 필수적입니다. 의존성을 지원하지 않습니다. 연산 수행은 의존...Discuss[React] 당신은 상태를 필요로 하지 않을 것입니다.React
Hermione DadheechforKeploy Tech Blogkeploy-blog.hashnode.dev·Jul 25, 2024Efficient DOM Manipulation with the Virtual DOM and RefsThe Secret to Fast and Responsive Websites Ever wondered why your favorite websites are so fast and responsive? It all boils down to how they handle DOM manipulation. The Document Object Model (DOM) represents your web page as a structured tree. Trad...DiscussReact
Tushar Puritusharpuri.hashnode.dev·Jul 14, 2024React Refs: A Guide for Practical Use CasesReact’s ref system is a powerful tool that allows direct interaction with DOM elements and child components. Understanding React Refs: Ref Basics: Refs in React provide a way to access and manipulate DOM elements or React components directly. Types o...DiscussuseRef
Nghia Tieucswithtieu.hashnode.dev·Jun 30, 2024Q3. Giải thích cơ chế hoạt động của useRef?useRef là một hook trong React được dùng để tạo tham chiếu mutable mà không gây ra re-render khi giá trị của nó thay đổi. useRef có nhiều mục đích sử dụng khác nhau trong React, và có một số lợi ích quan trọng so với việc sử dụng một biến const bên n...DiscussPhỏng vấn react nativeReact Native
Piyushpiyusss.hashnode.dev·Jun 18, 2024Day 27 React with MeUser Authentication with firebase User authentication is an essential feature for most web applications. Firebase provides a robust and straightforward way to handle authentication. First step is to go to the firebase site and create an account, ther...DiscussuseRef