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

Why are text nodes in jsx interpreted as symbols?

$
0
0

I’m in two minds on this.

JS jsx is visually less noisy and as such lets you grok the html structure more easily.

Rescript jsx makes it super clear that you need a React.element inside tags, no magic.

I could imagine the following, anything between {} stays backwards-compatible with our current version and then anything directly between tags being interpreted as a text node. Compiler error messaging will be crucial as it might appear magical.

Admittedly I’ve not spent much time thinking through too many scenarios.

I’d vote for a cleaner looking template if the DX is clear


Viewing all articles
Browse latest Browse all 2592

Trending Articles