How to use React "useId" Hook in rescript?

Hi All,
I am trying to generate unique id’s for each input field. Can anyone suggest how to use React useId Hook in rescript.

Thanks in Advance!!

There is nothing special about it, you can do it the same way as in JavaScript.


module PasswordField = {
  let make = () => {
    let passwordHintId = React.useId()

        <input type_="password" ariaDescribedby={passwordHintId} />
      <p id={passwordHintId}>
        {React.string("The password should contain at least 18 characters")}

[Playground link]