You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
Hi there! Thank you for working on a robust polymorphic component package with forwardRef support. I've been following the recent updates, including addition of react-polymorphed types. I noticed the event type gets lost when using as prop. It works in react-polymorphed, but not here. I was wondering if thats expected or a known issue?
Thanks for catching that and providing a good reproduction 💖
When we remove the ElementType and narrow it to as?: Default, the event typings are correct again ✨ but another error appears when I try to declare a React component like this:
Types of property 'as' are incompatible.
Type 'AsComponent | undefined' is not assignable to type '"div" | undefined'.
Type 'AsComponent' is not assignable to type '"div" | undefined'.
Type 'ElementType' is not assignable to type '"div" | undefined'.
Type '"symbol"' is not assignable to type '"div"'.
Hi there! Thank you for working on a robust polymorphic component package with
forwardRef
support. I've been following the recent updates, including addition ofreact-polymorphed
types. I noticed the event type gets lost when usingas
prop. It works inreact-polymorphed
, but not here. I was wondering if thats expected or a known issue?react-polymorphed
@polymorphic-factory/react
The text was updated successfully, but these errors were encountered: