tom-sherman / rescript-remix

MIT License
30 stars 5 forks source link

`useMatches` bindings #8

Open tom-sherman opened 2 years ago

tom-sherman commented 2 years ago

https://remix.run/docs/en/v1/api/remix#usematches

This is a little tricky as while a basic match can be modelled as:

type match = {
  pathname: string,
  params: Js.Dict.t<string>,
}

It doesn't include handle, the property that is most important from the hook. I'm not sure how best to type this.