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 with JSX 4 component #617

Closed
cknitt opened this issue Oct 29, 2022 · 8 comments · Fixed by #623
Closed

Create interface file with JSX 4 component #617

cknitt opened this issue Oct 29, 2022 · 8 comments · Fixed by #623
Milestone

Comments

@cknitt
Copy link
Member

cknitt commented Oct 29, 2022

Given a JSX 4 component defined in Test.res:

@react.component
let make = (~a: string) => React.string(a)

I get the following Test.resi when using the "ReScript: Create interface file..." action:

type props<'a> = {a: 'a}
let make: props<string> => React.element

I would have expected to get

@react.component
let make: (~a: string) => React.element

(same as for JSX 3).

@cknitt cknitt added this to the v10.1 milestone Oct 29, 2022
@cristianoc
Copy link
Collaborator

This, and genType check, are finishing touches for the release. There are dependencies on the actual representation of things so only make sense to do when we know nothing else changes.
Basically, we need a final rc candidate first, then these.

@fhammerschmidt
Copy link
Member

The latest master extension still does not generate a @react.component for me when I use JSXV4. Regardless of mode, both automatic and classic give me the same result that Christoph mentions above.

@cristianoc something is still missing

@cristianoc
Copy link
Collaborator

The latest master extension still does not generate a @react.component for me when I use JSXV4. Regardless of mode, both automatic and classic give me the same result that Christoph mentions above.

@cristianoc something is still missing

What compiler version? Try 10.1.0-rc.4.

@fhammerschmidt
Copy link
Member

I tried with both 10.1.0-rc.4 and 10.1.0-rc.5.

@cristianoc
Copy link
Collaborator

@fhammerschmidt can you start from the project in this? #636
I've switched to V4 and the interface file is create in CI. Should work from the editor directly too.

@cristianoc
Copy link
Collaborator

OK I have some examples that don't work.

@cristianoc
Copy link
Collaborator

@fhammerschmidt should be fixed now.

@fhammerschmidt
Copy link
Member

Thank you very much!

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

Successfully merging a pull request may close this issue.

3 participants