import { trpc } from '~/utils/trpc'; export default function Example() { const hello = trpc.useQuery(['example.hello', { text: 'from tRPC!' }]); const getAll = trpc.useQuery(['example.getAll']); return ( <>
{/* Primary column */}

Photos

{hello.data ?

{hello.data.greeting}

:

Loading..

}
{JSON.stringify(getAll.data, null, 2)}
{/* Secondary column (hidden on smaller screens) */} ); }