Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

Using a scoped polymorphic type for react-router bindings to loader function

$
0
0

I usually use a module type abstraction for it. Something like:

module type Entry = {
  type loaderData
  let element: unit => React.element
}

It adds overhead but it’s just wrap/unwrap. And I guess it doesn’t invalidate memoization in the specific usecase


Viewing all articles
Browse latest Browse all 2592

Trending Articles