4 ms·
So how is it different from React and JSX?
by realharo 7y ago
So how is it different from React and JSX?
- maxaf 7y agoJSX 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.