What 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...1 min read·learnwithriya.hashnode.devApr 21, 2025
How 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...2 min read·learnwithriya.hashnode.devApr 21, 2025
The 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...2 min read·learnwithriya.hashnode.devApr 21, 2025
JavaScript - 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 ...2 min read·learnwithriya.hashnode.dev1MDec 13, 2022
CSS 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...2 min read·learnwithriya.hashnode.dev1SSep 21, 2022