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