Reason: Consistently use `{}` instead of `()` in JSX

Created on 31 Jul 2018  Â·  5Comments  Â·  Source: reasonml/reason

<div foo={a + 1}> {2 + 3} </div>;

This should format idempotently, and not format to:

<div foo=(a + 1)> (2 + 3) </div>;

Likewise for fragments. And maybe other things I'm missing.

Most helpful comment

It's what JS JSX uses

All 5 comments

cc @jaredly @IwanKaramazow any opinion? Or are people fine with () nowadays?

Why {}?

It's what JS JSX uses

Yeah, I think {} is nice for similarity with js, also reduces the number of () :P

Indeed, it's probably time to go through all of jsx and make it braced.
I'm up for the task…

Was this page helpful?
0 / 5 - 0 ratings