From 0e7fd7cb7734894274bd93910dccec825b7af4f1 Mon Sep 17 00:00:00 2001 From: yoosangwook Date: Wed, 15 Jan 2025 13:34:17 +0900 Subject: [PATCH] add swr tutorial --- src/components/Playground.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Playground.jsx b/src/components/Playground.jsx index 98c90a45..1096881f 100644 --- a/src/components/Playground.jsx +++ b/src/components/Playground.jsx @@ -267,8 +267,8 @@ export default function Playground() { } const [getFetcherCallFlag, setGetFetcherCallFlag] = useState(false) - const { data: tutoData, error, isLoading } = useSWR('http://localhost:3000/api/swr-tutorial', getFetcher) - const { trigger, isMutating } = useSWRMutation('http://localhost:3000/api/swr-tutorial', postFetcher) + const { data: tutoData, error, isLoading } = useSWR('http://localhost:8080/api/tutorial', getFetcher) + const { trigger, isMutating } = useSWRMutation('http://localhost:8080/api/tutorial', postFetcher) return ( <>