Skip to content

Question: support for .useSuspenseQuery(...)? #10

Open
@qodeboy

Description

@qodeboy

Hello, thanks for the awesome work! Just a question. Right now when I need to fetch query during SSR, I have to write something along those lines:

const query = trpc.procedure.useQuery();

onServerPrefetch(async () => {
  await query.suspense();
})

Is there a better way? Maybe including a simple decorator for this matter (useSuspenseQuery) would make sense for this package, since it integrates nicely into nuxt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions