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

Why does ReScript React use labeled arguments instead of props?

$
0
0

Or maybe your question is React-specific.

In JSX v4, you can use record types for sharing.

But still, labeled arguments can provide better ergonomics. It allows for co-locating type definitions and inference without having to duplicate declarations.

This is a feature that TypeScript people are really envious of, and is also a proposal for the Component DSL that Flow recently added.

We’re already ahead of the curve :wink:


Viewing all articles
Browse latest Browse all 2592

Trending Articles