While following a tutorial, I stumbled upon this code snippet:
import useSWR from "swr"
import { fetcher } from "./fetcher"
export function useFeed() {
const { data: feed } = useSWR("/api/feed", fetcher)
return { feed }
}
What's the significance of the :
between data
and feed
? Why is feed
being returned instead of data
? The pattern of using semicolons in the Next.js SWR documentation seems to be consistent. Could someone clarify its purpose?