`abs` not recognized as valid for TypeScript
Open
Nobody has claimed this yet.
bug
typescript
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 748
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 1
Description
Description
When using the prop abs with TypeScript, it throw an error:
Property 'abs' does not exist on type 'IntrinsicAttributes & ViewProps & RefAttributes<View>'
Related to
- Components
- Demo
- Docs
- Typings
Steps to reproduce
- Use the
<View />component in a TypeScript project - Set the
absprop to this component
Expected behavior
Be valid
Actual behavior
Invalid type
More Info
Code snippet
const Component = () => {
return <View abs />;
}
Screenshots/Video
Environment
- React Native version: 0.72
- React Native UI Lib version: 7.5.0
Affected platforms
- Android
- iOS
- Web
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TypeScript typings for the View component and reproduce the issue using the provided TSX snippet with React Native 0.72 and UI Lib 7.5.0. The work is done when the abs prop is accepted by TypeScript for View without the reported type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100