4 ms·
Yeah, JSX. Whoops!
by iLoch 12y ago
Yeah, JSX. Whoops!
- masklinn 12y agoYeah it's completely optional, facebook built it because they had built something similar previously and they like it, and I guess it may be simpler for "pure" designers used to HTML and stuff, but it's AOT-compiled to the corresponding JS calls and the mapping is fairly simple: <Component1 attr1="value1" attr2={foo}> <Component2/> <Component3/> </Component1> becomes (more or less) Component1( {attr1: "value", attr2: foo}, Component2(), Component3() );