일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 특정 dom node만 노출시키고 싶을 때
- app.listen
- css module classNames
- components as formulas
- 리스티웨이브
- http.createserver
- pure functions
- 스프린트 여정 마침
- 리액트 19 useref
- dynamic metadata
- node.js(express) + ws(websocket) + react
- 회고
- express react
- React
- 이미지 업로드 과정
- inferred type error
- 티스토리챌린지
- 리액트로 채팅 기능 구현하기
- 오블완
- trigger additional callbacks
- CSS module 장점
- next.js
- 프리렌더링
- 코드잇 스프린트 FE 1기
- usemutation custom hook
- express로 채팅 기능 구현하기
- useimperativehandle 사용법
- useimperativehandle 사용할때
- useref 타입
- type reference cannot be named error
Archives
- Today
- Total
목록useref 타입 (1)
Life is connecting the dots .

최근 프로젝트를 하면서 useImperativeHandle hook에 대해 알게 되었다. 이번 포스팅은 해당 hook이 무엇인지, 언제 사용하는지, 어떻게 사용하는지에 대해 정리해 두고자 작성한다. 정의useImperativeHandle은 React Hook으로 ref로 커스텀 메소드를 만들 수 있게 해 준다. 다시 말하면, 사용자 정의 ref 핸들러를 부모 컴포넌트에서 사용할 수 있도록 노출시킬 수 있다. 사용법은 컴포넌트 최상위 레벨에서 useImperativeHandle을 호출해서 노출할 ref에 커스텀 메소드(createHandle)를 작성해 준다. // (참고) React v19// (1)import { useImperativeHandle } from 'react';// 자식 컴포넌트functi..
Programming/React
2025. 2. 27. 11:14