镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

jsx.componentWithProps - Goto Definition Issue #1138

Open

Description

@dkirchhof

Hey,

I'm a fan of defining my (react) components with jsx.componentWithProps instead of using labeled arguments.
Unfortunately I had to figure out, that the goto definition command doesn't work for these components.

Example:

// App.res

@jsx.component
let make = () => {
  <div>
    <SomeComponent test="" />
    <SomeComponent2 test="" />
  </div>
}
// SomeComponent.res

type props = {
  test: string
}

@jsx.componentWithProps
let make = props => {
  <div className=props.test></div>
}
// SomeComponent2.res

@jsx.component
let make = (~test: string) => {
  <div className=test></div>
}

While I can hover over <SomeComponent2... /> and use a short cut to go to the implementation / definition ("SomeComponent2.res"), it doesn't work on <SomeComponent .../>.

Hints for props will be shown in both cases.

Image

Activity

  1. zth commented on Oct 13, 2025

    @zth
    Member

    Thanks for reporting. Fixing all of these things will be a priority now that v12 is nearing a stable release. Keep 'em coming please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions