-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Versions
- @prismicio/react: v2.5.1
- react: v18.2.0
- node: v16.18.1
Reproduction
https://codesandbox.io/s/modern-shadow-2tqpqb?file=/src/App.tsx
Steps to reproduce
- Go to the repro link
- See the TypeScript errors
- Change the
@prismicio/reactversion tov2.1.2 - See the TypeScript errors disappear
What is expected?
@prismicio/[email protected] should not have the type errors
What is actually happening?
Trying to upgrade @prismicio/react to the latest version is blocked on type errors related to internalLinkComponent and externalLinkComponent:
Type '({ href, target, children, rel }: { href: any; target: any; children: any; rel: any; }) => Element' is not assignable to type '"a"'.
I have not been able to find a workaround (aside from type casting) or update to the PrismicLinkProps interface that accommodates custom components and DOM tag names.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working