3 ms·
> XAML can declare any type and configure it as needed, it is a way of declaring components in a logical fashion. XAML is a lot like Python object constructor
by dragonwriter 7y ago
> XAML can declare any type and configure it as needed, it is a way of declaring components in a logical fashion.
XAML is a lot like Python object constructor syntax with all named parameters except one positional parameter that is a list of child objects (obviously, explicit closing tags rather than a closing square bracket and paren is a difference, but structurally it's m almost identical.) It's certainly a convenience for declaring certain kinds of object trees, especially if your main programming language doesn't have a similarly succinct object construction syntax. JSX is effectively a way of adding an equivalent object constructions syntax to the host (JS) language, rather than requiring it to be in separate code files.