5 ms·
The #1 reason React works for me is that the UI and code are in the same file. It's so easy to go back and refactor changes when everything is right there. The
by jarjoura 9y ago
The #1 reason React works for me is that the UI and code are in the same file. It's so easy to go back and refactor changes when everything is right there. The natural composability you get from that over time is such a huge win in productivity and major wins for team scalability. The one-way data flow is honestly just a natural outgrowth of that architecture.
WPF and its sister frameworks, Silverlight and UWP all promote this disconnected way to develop the UI. Create a XAML file that then needs to be carefully crafted in a way that hooks up to the code class files. It was initially sold as an idea that designers would build the XAML and the engineers would work on the code. They even released a mini-adobe lite suite marketed to designers.
UWP in its latest iteration seems to acknowledge XAML's shortcomings. They introduced a new new UI foundational framework call the VisualLayer (aka DirectComposition). It reminds me a lot of iOS's CoreAnimation framework.
- insulanian 9y ago> The #1 reason React works for me is that the UI and code are in the same file. It's so easy to go back and refactor changes when everything is right there. We're bashing VB6 for this exact reason, and now this is cool again?
- LeoNatan25 9y agoThe world of JS / web "development". They are just now discovering that type system and compilers have advantages!
- yazaddaruvala 9y agoI think its cuz the whole package just works. Just inlining views into JS wouldn't have been good. But when you add unidirectional data flow, composable components and lots of best practice docs, then you have a system that works really well.
- douche 9y agoVB6 just worked, too. In many ways, it worked better than the current conglomeration of web-dev technologies that replaced it.
- tonyedgecombe 9y agoThe language was a bit iffy but boy was it productive, we seem to have gone backwards in so many ways.
- pjmlp 9y agoWhich is why as full stack developer across native and web stacks, I try to avoid web projects as much as possible.
- iantaylor 9y agoFwiw, the main motivation for the separation was for the IDE. It got easily confused mixing code and markup so we opted to keep them apart.