Skip to content

@react.component props record in externals not automatically marked as live #994

Closed
rescript-lang/rescript
#6796
@zth

Description

@zth

Bind an external component:

module StyledItemsList = {
  @module("./styles") @react.component
  external make: (~children: React.element, unit) => React.element = "StyledItemsList"
}

Use it with children:

<StyledItemsList>
      {React.string("Hello")}
</StyledItemsList>

It's still reported as:

StyledItemsList.props.children is a record label never used to read a value

But I assume it should be automatically marked as live because it's sent into an external.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions