Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Idea: Prop type skip #153

Open
danieldelcore opened this issue Jan 19, 2021 · 0 comments
Open

Idea: Prop type skip #153

danieldelcore opened this issue Jan 19, 2021 · 0 comments

Comments

@danieldelcore
Copy link
Contributor

danieldelcore commented Jan 19, 2021

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:

/** @ert-override Props */ 

// 👆 this statement tells ERT which props to access 

interface Props {
  bar: string;
}

const MyComponent: FC<Props> = props => null;

export default withBadHOC(withAnotherHOC(MyComponent)); // 💥 ERT is unable to grab these props because they're obscured by this HOC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant