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

FormData and Object bindings

$
0
0

Object.fromEntries is bound by both Dict.fromArray and Dict.fromIterator.

About FormData, there is a fairly recent thread: Using FormData in rescript react, but I agree it should be easier to find and rescript-webapi could be modernized.

The _ makes the type system allow any type. It’s similar to 'a, but it also works for multiple arguments as long as they are all generic.

Example:

type props<'a, 'b, 'c> = {a: 'a, b: 'b, c: 'c}
let make = ({a, b}: props<_>) => Console.log2(a, b)

Viewing all articles
Browse latest Browse all 1819

Trending Articles