Open History to see the last commit
1import React from 'react'
2import { HydrationBoundary, dehydrate, noop } from '@tanstack/react-query'
3import { pokemonsQueries } from '../services/pokemons/queries'
4import { PokemonInfo } from './pokemon-info'
5import { getQueryClient } from '@/app/get-query-client'
6β
7export default function Home() {
8 const queryClient = getQueryClient()
9β
10 void queryClient.query(pokemonsQueries.detail(25)).catch(noop)
11β
12 return (
13 <main>
14 <h1>Pokemon Info</h1>
15 <HydrationBoundary state={dehydrate(queryClient)}>
16 <PokemonInfo />
17 </HydrationBoundary>
18 </main>
19 )
20}