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

Create interface file does not work with React.memo #382

Closed
cknitt opened this issue Apr 5, 2022 · 1 comment
Closed

Create interface file does not work with React.memo #382

cknitt opened this issue Apr 5, 2022 · 1 comment

Comments

@cknitt
Copy link
Member

cknitt commented Apr 5, 2022

@cristianoc Thanks for your great work on getting the "Create interface file" feature to work for React components, too! 👍

I just tested it with the VSIX from the lastest master build and found that components memoized with React.memo do not work correctly yet.

For example,

@react.component
let make = (~someValue as _: bool) => React.null

let make = React.memo(make)

results in

let make: React.component<{"someValue": bool}>

instead of

@react.component
let make: (~someValue: bool) => React.element
@cristianoc
Copy link
Collaborator

Thanks!
Done in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants