4 ms·
Really appreciate the insights!! I think JSX/TSX are a lot more powerful than most data representations because 1) you can modularize and import sub-circuits re
by seveibar 2y ago
Really appreciate the insights!! I think JSX/TSX are a lot more powerful than most data representations because 1) you can modularize and import sub-circuits really easily and with an effective known pattern (the npm registry installation pattern) 2) you can compute pretty complicated data from relatively simple React components, e.g. <DualInlinePackage pad_count={6} /> produces 6 pads with standard spacing. I also think it's really powerful you can add type validation (e.g. any odd number is invalid for pad_count). I'm counting on smart people creating awesome patterns/higher-level-components just like they did with React for web!
- sesm 2y agoIt kind of interesting to think, how can you define 'React for X'? My best definition would be: - JSX syntax - Immediate Mode - style API (computing inside UI code and having the same semantics as if it's recomputed on each render frame)
- fendy3002 2y agoYeah because jsx is popularly used by react (and even maybe the first?), people associate jsx as react. We need more jsx (tsx) outside of react, or compilable / type definitive xml.
- micael_dias 2y agoYes, JSX was created for React. It was at the time a controversial syntax that most disliked. There’s a great Honeypot documentary on React that goes over it.