Binding to the "type" prop



I want to bind to an external javascript button component that has the prop: “type”.

[@bs.module "path/to/button.js"] [@react.component]
external make:
    ~children: React.element,
    ~variant: string,
    ~color: string,
    ~onClick: ReactEvent.Form.t => unit,
    ~type: string
  ) =>
  React.element =

Is there a way to achieve this with @react.component and without having to use the makeProps syntax?


The convention for FFI is that if you add a underscore, bucklescript will simply ignore it

So try _type instead


Worked, Thank you!