Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

watch ref.current changes typescript

  const refCallback = useCallback(<T extends HTMLElement>(node: T | null) => {
    if (!node) return
    // do your stuff
  }, [])
  
  // use it like:
  <div ref={(node) => refCallback(node)} />
Comment

PREVIOUS NEXT
Code Example
Typescript :: input deno 
Typescript :: cra ts pwa 
Typescript :: typescript function type 
Typescript :: how to Write a program that accepts three decimal numbers as input and outputs their sum on python 
Typescript :: clean broken shortcuts in windows start menu 
Typescript :: react native paper 
Typescript :: eloquent fetch documents specific date 
Typescript :: latest unity version that supports 32 bit 
Typescript :: how to keep only certian objects python 
Typescript :: typescript date before 
Typescript :: make a type in typescript 
Typescript :: Error: "prettier/@typescript-eslint" has been merged into "prettier" in eslint-config-prettier 8.0.0 
Typescript :: cmd move all files to parent directory 
Typescript :: import ts in html 
Typescript :: conventional commits cheat sheet 
Typescript :: typescript array contains string 
Typescript :: use pipe in ts file angulr 
Typescript :: how to reset windows update components in windows 
Typescript :: cacerts default password 
Typescript :: paths typescript 
Typescript :: testing techniques 
Typescript :: display moment in format dd/mm/yy only last two digits of year 
Typescript :: typeorm generated 
Typescript :: ipywidgets popup window 
Typescript :: how to delete a message by its id 
Typescript :: feature counts bioconda 
Typescript :: how to check string array is sorted or not in typescript 
Typescript :: java to typescript 
Typescript :: ruby all elements in array are equal 
Typescript :: TypeError: __cinit__() takes at least 2 positional arguments (0 given) 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =