function useSessions(userId: number | null) { trpc.sessions.useQuery({ userId }, { enabled: userId !== null }); ... }
typescript: Type 'number | null' is not assignable to type 'number'.
Join the Discord to ask follow-up questions and connect with the community
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
4,854 Members