How to use React.useSyncExternalStore?

Hey y’all

I am getting started with ReScript. How to use React.useSyncExternalStore? I didn’t find any documentation, and I had unexpected behaviour.

type vanillaActor = {name: string}

type store = {
  subscribe: @uncurry (unit => unit, . unit) => unit,
  getSnapshot:  @uncurry unit => vanillaActor,

let make = (~store: store) => {
  let actor: vanillaActor = React.useSyncExternalStore(store.subscribe, store.getSnapshot)


  <div className="App">
    <p> {>React.string} </p>

I don’t get the problem. Could anyone help me?

I solved the problem with the following code:

  let actor: vanillaActor = React.useSyncExternalStore(~subscribe=store.subscribe, ~getSnapshot=store.getSnapshot)