add swr tutorial

This commit is contained in:
yoosangwook 2025-01-15 13:34:17 +09:00
parent 8182ce42ba
commit 0e7fd7cb77

View File

@ -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 (
<>