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

Flow-like render types?

$
0
0

Flow recently added a type system feature which allows to restrict children by component type called Render Types


component Header(size: string, color: string, message: string) {
  return <h1 style={{color}}>{message}</h1>;
}

component Layout(header: renders Header) {
  return <div>{header}</div>;
}

Does rescript type system allows that already?


Viewing all articles
Browse latest Browse all 2592

Trending Articles