snapshot of https://github.com/TanStack/query.git (main, 2026-09-16; blobs > 131072B omitted)
This commit is contained in:
18
examples/react/nextjs-app-prefetching/app/pokemon-info.tsx
Normal file
18
examples/react/nextjs-app-prefetching/app/pokemon-info.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
'use client'
|
||||
|
||||
import React from 'react'
|
||||
import { useSuspenseQuery } from '@tanstack/react-query'
|
||||
import { pokemonOptions } from '@/app/pokemon'
|
||||
|
||||
export function PokemonInfo() {
|
||||
const { data } = useSuspenseQuery(pokemonOptions)
|
||||
|
||||
return (
|
||||
<div>
|
||||
<figure>
|
||||
<img src={data.sprites.front_shiny} height={200} alt={data.name} />
|
||||
<h2>I'm {data.name}</h2>
|
||||
</figure>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user