atlassian / atlassian/extract-react-types

Idea: Prop type skip

Open
#153 0 comments 0 reactions 0 assignees View on GitHub
💬 discussion enhancement
Dominant language
JavaScript
Stars
188
Forks
31
PR merge metrics
No merged PRs in 30d

Description

In some cases where a component's props are obscured by higher order components we should to define an override so that ERT can still access the relevant props of the component

My idea is a comment override:

```jsx

/** @ert-override Props */

// 👆 this statement tells ERT which props to access

interface Props {
bar: string;
}

const MyComponent: FC = props => null;

export default withBadHOC(withAnotherHOC(MyComponent)); // 💥 ERT is unable to grab these props because they're obscured by this HOC
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.