docs: trpc now optional — prerequisite notes + conditional HTML

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-09 14:13:12 +02:00
parent c8116ac3f4
commit 1967cb36ec
10 changed files with 48 additions and 39 deletions

View File

@@ -2801,7 +2801,7 @@ function makeStages(F) {
meta: `@repo/${F.name}/ui`,
file: `packages/${F.name}/src/ui/query.ts`,
tag: "client",
prose: `<code>${F.queryName}</code> on the client builds a typed React Query option object. The args type is inferred all the way back from the use case's <code>${F.inputSchemaName}</code>, exported from the feature root.`,
prose: `<code>${F.queryName}</code> on the client builds a typed React Query option object. The args type is inferred all the way back from the use case's <code>${F.inputSchemaName}</code>, exported from the feature root. <em>Note: <code>useTRPC()</code> is provided by <code>@repo/core-trpc</code> — an optional package. Scaffold it with <code>pnpm turbo gen core-package trpc</code> if not yet present.</em>`,
code: F.queryName.startsWith("(") ?
`// auth procedures are mutations — invoked via useMutation, not useQuery
const trpc = useTRPC();