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

Multiple parameter lists are not supported #640

Open
nadenf opened this issue Apr 16, 2023 · 0 comments
Open

Multiple parameter lists are not supported #640

nadenf opened this issue Apr 16, 2023 · 0 comments

Comments

@nadenf
Copy link
Contributor

nadenf commented Apr 16, 2023

Given a React component:

@react object Component {
  case class Props(argA: Int, argB: String)(argC: Double)

  val component = FunctionalComponent[Props] { props =>
    h1(props.argC)
  }
}

There are a few issues related to supporting multiple parameter lists.

Multiple parameters are not merged

Will not compile with error:

value argC is not a member of com.example.Component

IntelliJ doesn't recognise multiple parameter lists for autocomplete

In addition when writing props and engaging autocomplete it will not show the full list of parameters.

IntelliJ doesn't recognise multiple parameter lists when used

Using the above component but without the h1 e.g.

Component(1, "2")(3.0)

Will compile but IntelliJ will show the red line with the error message "Unspecified value parameters: args: Double).

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

1 participant