PERF003infoPro

redundant-trpc-calls

3+ tRPC calls to the same router suggest data should be fetched once.

Applies to: JavaScript, TypeScript

Why this matters

When multiple components in one file each call the same tRPC router (e.g. trpc.team.getMembers, trpc.team.getSettings, trpc.team.getRoles), each call creates a separate network request. Consider fetching once at a parent level and passing data down, or combining into a single procedure.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, PERF003 includedstablestack explain PERF003

PERF003 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: PERF003