Skip to content

"no children prop" error does not show line number #7538

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
mediremi opened this issue Jun 5, 2025 · 0 comments · May be fixed by #7540
Open

"no children prop" error does not show line number #7538

mediremi opened this issue Jun 5, 2025 · 0 comments · May be fixed by #7540
Assignees

Comments

@mediremi
Copy link
Contributor

mediremi commented Jun 5, 2025

ReScript version v12.0.0-alpha.14's "no children prop" error does not show line numbers:

module Wrapper = {
  @react.component
  let make = (~value: 'value) => {
    <div> {React.null} </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

  This JSX component does not accept child elements. It has no children prop <Wrapper /> 

(Playground link)

@nojaf nojaf self-assigned this Jun 6, 2025
@nojaf nojaf linked a pull request Jun 6, 2025 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants