3 ms·
JSX is an external DSL implemented in and interoperable with JavaScript. SwiftUI is an internal DSL implemented in Swift and thus allowing the full power of Sw
by maxaf 7y ago
JSX is an external DSL implemented in and interoperable with JavaScript.
SwiftUI is an internal DSL implemented in Swift and thus allowing the full power of Swift’s rich type system to tag along.
See https://martinfowler.com/books/dsl.html https://martinfowler.com/books/dsl.html for more discourse on the difference between internal and external DSLs.
- realharo 7y agoYou can use TypeScript with JSX and you get all the checking (required properties, types of values, types of children, etc.) and everything. In fact, "TSX" is an official built-in part of TypeScript.