Can't use <Authenticated> component from convex/react-clerk
Perhaps this is just me still being a React noob, but I'm getting the following error when I try to use the
<Authenticated>
component in a React component:
I suppose either the type signature is wrong, or I'm doing something wrong in using the component.
Here's the code for the component where it's being used:
9 Replies
@RJ what Convex version are you using? This may have been fixed in a point release
0.12.2
nevermind then, let's see...
I also have some other questions/comments on the Convex Clerk docs!
Would it be easier if I posted them as separate issues?
What's the react version you're using, and the @types/react version?
hmmm either way, hard to know if they'll be the same
"react": "^18.2.0"
and "@types/react": "^18.0.32"
I'll post them separatelySorry, this is our/TypeScript bug. The component will work but it doesn't typecheck. You can ignore the type error for now, we'll release a patch version soon with a fix for it.
{/* @ts-ignore */}
above the component use should do the trickAll good! I've already worked around it by just checking
isAuthenticated
in useConvexAuth
instead, which is fine.@RJ the latest convex 0.12.4 npm package includes the fixed types 🙂