SystemParadox/triplet

Cannot parse JSX

Closed this issue · 1 comments

Cannot currently parse JSX with {} components:

<Foo key={ foo }>hello</Foo>

The issue is that / following } is assumed to be a regex. In reality this requires looking back (through functions) to determine if we are in an expression or a statement.

How can we differentiate between these?

function foo() { }>5
<Foo key={ }>5</Foo>
<Foo key={ } />

Fixed in 1.2.0.