Hacker News new | ask | show | jobs
by mlsarecmg 2963 days ago
XAML is a template, JSX is a DSL. A template kills scope, duplicates coding semantics, messes up app flow with bindings and needs dependency injection to get local scope back - all of this has been solved with JSX, which now pretty much fulfills Silverlights dream: https://news.ycombinator.com/item?id=16198843

The crazy part is, that you can share code and eco-system components among these targets, no matter if they're native or otherwise. Here's a shell applications for instance that uses react-motion to shift stuff around: https://github.com/gaearon/react-blessed-hot-motion

Microsoft seems heavily invested in it as well (react-windows, reactXP, UI-fabric, ...).

1 comments

XAML components ("controls" in MS terminology) contain both declarative markup and code. And it's flexible because the visual presentation can be completely overriden by the component's consumer without altering behavior, and your code can be either C# or C++.

What does dependency injection have to do with anything? There's nothing stopping you from using global variables or an event bus or something like Redux in a XAML app.