Skip to content

"Missing required props" error does not show line number when component has children prop #7537

Open
@mediremi

Description

@mediremi

ReScript version v12.0.0-alpha.14's "Missing required props" error does not show line numbers when the component has a children prop:

module Wrapper = {
  @react.component
  let make = (~value: 'value, ~children: React.element) => {
    <div> {children} </div>
  }
}

module SomeComponent = {
  @react.component
  let make = () => {
    <Wrapper>
      <div> {""->React.string} </div>
    </Wrapper>
  }
}
FAILED: Foo.cmj

  We've found a bug for you!
  /home/mediremi/test/Foo.res

  The component <Wrapper /> is missing these required props:
   value

(Playground link)

Metadata

Metadata

Assignees

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