RARiya Agarwalinlearnwithriya.hashnode.dev·Apr 21, 2025 · 1 min readWhat is the useRef Hook of ReactThe useRef hook is used to persist values across component re-renders. It is used for DOM manipulation. useRef is the midway between variables and state values. Unlike variables, useRef is persistent across re-renders. Syntax:- const myRef = useRef(i...00
RARiya Agarwalinlearnwithriya.hashnode.dev·Apr 21, 2025 · 2 min readHow the useCallback hook worksuseCallback hook is used for performance optimization and to cache something. When do we use useCallback? It is used to freeze a function reference. See, whenever a component renders, all the functions of the component are created.Therefore, when a c...00
RARiya Agarwalinlearnwithriya.hashnode.dev·Apr 21, 2025 · 2 min readThe what and how of useMemo hookFor a long time, useMemo had been a mystery to me. Now that I understood it, I thought of documenting everything the way I understand it so that other fellow developers may also benefit. What is useMemo used for? useMemo is used to avoid running a re...00
RARiya Agarwalinlearnwithriya.hashnode.dev·Dec 13, 2022 · 2 min readJavaScript - An OverviewWhat is JavaScript? JavaScript gives life to a website. It is because of JavaScript that we as users can fill out names in an online form, filter dresses by popularity on an e-commerce website, and listen to our favorite music on Spotify. JavaScript ...01M
RARiya Agarwalinlearnwithriya.hashnode.dev·Sep 21, 2022 · 2 min readCSS UnitsSelecting the perfect unit for your CSS code can be daunting. Here, is a basic explanation of the most used units and which ones to go for your styling needs. Units are broadly classified into two categories:- Absolute units Relative units Confused...01S