clerk integration next.js
I am trying to use Clerk Auth with Convex and I seem to keep getting this error:
Unhandled Runtime Error
Error: Could not find Convex client!
useMutation must be used in the React component tree under ConvexProvider. Did you forget it? See https://docs.convex.dev/quick-start#set-up-convex-in-your-react-appI am using next.js and have created the convexclientprovider.tsx file to host both convex and clerk within a single component. However, when I wrap my app in the layout.tsx file with the component it seems to break.
Which ever component is the parent seems to work, while the child doesnt seem to get recognized.
Here is the code for the both files in the attached images.
Any obvious thing I am missing? Thank you!



