// (2) 상단의 queryKey 예제와 반대로 queryFn 자체적으로 인자를 받는 형태 const getSuperHero = async (heroId: string): Promise<AxiosResponse<Hero>> => { return await axios.get(`http://localhost:4000/superheroes/${heroId}`); }; const useSuperHero...
이제 사용자는newRef의current속성을 통해 하위 구성 요소의 마운트된 인스턴스에 액세스하고 하위 구성 요소의 메서드를 호출할 수 있습니다. this.childRef.current.childMethod(); ...
hookSimo library deployment URL: hookSimo simodal library deployment URL: simodal modal storybook deployment URL: modal storybook 안녕하세요 호프! 다시 만나서 반갑습니다! :) 그동안 잘 지내셨나요? 저
"axios": "^1.6.8", "js-combinatorics": "^2.1.2", moonheekim0118 May 25, 2024 👀 요건 왜 필요한 패키지인가욤? 👍 1 Member Author Parkhanyoung May 26, 2024 • edited 복수의 쿠폰 적용 시 최대 할인액을 적용하기 위...
react와 relay를 이용해 github graphql api를 호출하는 프로젝트입니다. Usage yarn install // 의존성 패키지 설치 yarn build // 프로덕션 빌드 yarn start // 프로덕션 실행 yarn dev // 개발 환경 yarn relay // relay ...
build(deps): Bump axios from 0.27.2 to 1.6.0 in /KakaoLoginExample (c… android 배송지 가져오기 기능 추가 (crossplatformkorea#374) image Feature/add banner image (crossplatformkorea#173) ios 배송지 가져오기 기능 추가 (crossplatformkorea#374) pl...
-? 리액트의 api 를 하나도 사용하지 않는데, 훅이라고 부를 수 있을까요~?src/api/delete/deleteCartItem.ts Outdated Comment on lines 6 to 9 const deleteCartItem = async (cartId: number) => { await axiosInstance.delete(API_URLS.DELETE_ITEMS...
// (1) const fetchSuperHero = ({ queryKey }: any) => { const heroId = queryKey[1]; // queryKey: (2) ['super-hero', '3'] return axios.get(`http://localhost:4000/superheroes/${heroId}`); }; const useSuperHeroData = (heroId: string) => { return useQuery(["super-hero"...
import { useQuery, useSuspenseQuery } from "@tanstack/react-query"; const fetchGroups = async (): Promise<{ data: Group[] }> => { const res = await axios.get("/groups"); return res; }; // as-is const { data } = useQuery({ queryKey: ["groups"], queryFn: fetchGroups, ...