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/react version to v2.1.2
- See the TypeScript errors disappear
What is expected?
@prismicio/react@2.5.1 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.
Versions
Reproduction
https://codesandbox.io/s/modern-shadow-2tqpqb?file=/src/App.tsx
Steps to reproduce
@prismicio/reactversion tov2.1.2What is expected?
@prismicio/react@2.5.1should not have the type errorsWhat is actually happening?
Trying to upgrade
@prismicio/reactto the latest version is blocked on type errors related tointernalLinkComponentandexternalLinkComponent: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
PrismicLinkPropsinterface that accommodates custom components and DOM tag names.