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

Unnecessary braces when autocompleting JSX props #7341

Open
cknitt opened this issue Mar 13, 2025 · 0 comments
Open

Unnecessary braces when autocompleting JSX props #7341

cknitt opened this issue Mar 13, 2025 · 0 comments
Labels
editor Everything concerning the analysis binary

Comments

@cknitt
Copy link
Member

cknitt commented Mar 13, 2025

Example:

type myVariant = AAAAA | BBBBB

module MyComponent = {
  @react.component
  let make = (~x: myVariant) => (x :> string)->React.string
}

<MyComponent x=

Autcomplete correctly suggests AAAAA and BBBBB. When I select AAAAA, I get

<MyComponent x={AAAAA}

The braces are unnecessary here, so I usually remove them again manually to get

<MyComponent x=AAAAA
@cknitt cknitt added the editor Everything concerning the analysis binary label Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Everything concerning the analysis binary
Projects
None yet
Development

No branches or pull requests

1 participant