ottomated / trpc-svelte-query

66 stars 9 forks source link

Readme Example is Incorrect #23

Open solhosty opened 6 months ago

solhosty commented 6 months ago

The readme example for pre-loading on the +page.server.ts should look like this.

import { trpcServer } from '$lib/server/server';
import type { PageServerLoad } from './$types';

export const load: PageServerLoad = async (event) => {
  await trpcServer.greeting.ssr({ name: 'tRPC' }, event);
};

It currently has trpc imported.

solhosty commented 6 months ago

Created PR for this here. https://github.com/ottomated/trpc-svelte-query/pull/24