Closed kropelka77 closed 2 years ago
Hey @kropelka77, thanks for the report. Could you try v2.1.2-alpha.0
and let me know if the issue is fixed and everything work as expected?
Background info: forwardRef
support was added to <PrismicLink>
in #131 and published in v2.1.1
. It uses a TypeScript declaration merging to support generics in prop types, which <PrismicLink>
needs. As you found, this causes issues globally in a project. v2.1.2-alpha.0
uses a different strategy to support generics which shouldn't affect projects globally.
Related: #128, #131, #132
Hi @angeloashmore, thank you for your quick reply!
I've checked and v2.1.2-alpha.0
solves the issue for me - it no longer overwrites global forwardRef
✨
Thanks for testing @kropelka77! The fix is published in v2.1.2
.
Versions
Reproduction
Additional Details
Morning, When trying to update `@prismicio/react` to the version 2.1.1, I've noticed that all my currently imported `forwardRefs` from `react` are now pointing to @prismicio implementation (caused by [this change](https://github.com/prismicio/prismic-react/pull/131) I assume). That actually causes an issue with the `displayName` for some files. Nevertheless, even though I could fix the default import with webpack, I don't feel comfortable using the latest update that overwrites it globally. Was that the expected behaviour?
Steps to reproduce
@prismicio/react
to the newest version 2.1.1import { forwardRef } from 'react'
(pic)What is expected?
Importing
forwardRef
fromreact
won't be overwritten by @prismicio in my whole application.What is actually happening?
All
forwardRef
imports are coming from @prismicio now.