kripod / kripod/react-polymorphic-box
displayName and propTypes are not allowed on forwardRef component
- Dominant language
- TypeScript
- Stars
- 346
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
## Description
Using displayName and propTypes on a forwardRef component shows error. I guess this is more of an issue with the example code than this library.
## Reproduction
https://codesandbox.io/s/typescript-as-prop-with-react-polymorphic-box-forked-hw0l5?file=/src/App.tsx
## Expected behavior
displayName and propTypes should be allowed.
## Actual behavior
displayName and propTypes are not allowed.
Contributor guide
Research direction
Reproduce the error in the linked CodeSandbox, then trace the TypeScript definitions used for the forwardRef component in this repository. Done means displayName and propTypes are accepted without errors while the existing polymorphic component typing behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100