Thanks Florian, the smart line breaks look good in that context.
Perhaps I’ve got any terminology wrong, but I think there’s a slight discrepancy in behavior when formatting ReScript code and JSX.
It appears that within a function one blank line is allowed between statements, whereas all blank lines are removed when the JSX is formatted.
In the example below I find it much easier to read when the switch statement has a blank newline before and after it (these are removed when formatting). I could explain this further, but ultimately it comes down to personal preference - I find it easier to see at a glance what’s happening in the code.
I don’t think adding comments would help necessarily, and even then I’d prefer a newline preceding the comment.
without spaces:
with spaces: