wix / wix/react-native-ui-lib

`abs` not recognized as valid for TypeScript

Open
#2,636 1 comment 0 reactions 0 assignees View on GitHub

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
  1. Use the <View /> component in a TypeScript project
  2. Set the abs prop 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.