ItsacoupI
Convex Community2y ago
4 replies
Itsacoup

Did you mean 'typeof ConvexProvider'?

Example straight outta of next.js quickstart has the ConvexProvider component throwing this TS error.
"'ConvexProvider' refers to a value, but is being used as a type here. Did you mean 'typeof ConvexProvider'?ts(2749)"

"use client";

import { ReactNode } from "react";

import { ConvexProvider, ConvexReactClient } from "convex/react";

const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);

export function ConvexClientProvider({ children }: { children: ReactNode }) {
  return <ConvexProvider client={convex}>{children}</ConvexProvider>;
}
Was this page helpful?