Skip to content
This repository was archived by the owner on Nov 13, 2023. It is now read-only.
This repository was archived by the owner on Nov 13, 2023. It is now read-only.

react.component externals for non-function components #225

Closed

Description

@rickyvetter

Currently if you write an external for a React component that requires prop conversions, the output will only work if the component is a function component:

[@genType]
type buttonType = | Disabled | Active | Primary;

[@react.component]
[@genType.import "./MyComponent"]
external make = (~type_: buttonType) => React.element = "";

In this case the generated output will call MyComponent.make as a function instead of with React.createElement. I think this inconsistency can cause issues if people aren't looking out for it.

Activity

  1. cristianoc commented on Jul 31, 2019

    @cristianoc
    Collaborator

    Explored here: #226.

  2. cristianoc commented on Aug 5, 2019

    @cristianoc
    Collaborator

    In #226.

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