일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- useref 타입
- http.createserver
- 이미지 업로드 과정
- useimperativehandle 사용법
- 회고
- 티스토리챌린지
- 프리렌더링
- 코드잇 스프린트 FE 1기
- 리액트 19 useref
- app.listen
- CSS module 장점
- 스프린트 여정 마침
- css module classNames
- express react
- dynamic metadata
- next.js
- 리스티웨이브
- inferred type error
- React
- components as formulas
- usemutation custom hook
- 리액트로 채팅 기능 구현하기
- type reference cannot be named error
- node.js(express) + ws(websocket) + react
- trigger additional callbacks
- pure functions
- 특정 dom node만 노출시키고 싶을 때
- express로 채팅 기능 구현하기
- 오블완
- useimperativehandle 사용할때
Archives
- Today
- Total
목록usemutation custom hook (1)
Life is connecting the dots .

프로젝트 [리스티웨이브]를 하면서 점점 기능이 늘어남에 따라 API도 늘어나고 있다. 리액트쿼리를 이용해서 서버 상태를 동기화해주고 있는데 useMutation을 사용해 API를 호출할 때 다음과 같이 사용하고 있다. // 삭제 뮤테이션 const deleteMutation = useMutation({ mutationFn: deleteNotice, onSuccess: () => { queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.getAdminAllNotice] }); }, }); // 알림 보내기 뮤테이션 const sendAlarmMutation = useMutation({ mutationFn: sendNotic..
Programming/React
2024. 11. 28. 18:29