Leverage ES decorators

JS has stage 3 decorators proposal

Would it be posible/considered to use ES decorators from rescript?

@defineElement("my-class")
class C extends HTMLElement {
  @reactive accessor clicked = false;
}

Only inside of the %%raw() block, since ReScript doesn’t support classes directly.

1 Like

As you can see from the proposal, it’s just a (high-order) function.

1 Like