3 ms·
I have used QML and JS React in different work projects, and I fail to see how QML is reactive. It is declarative but React is a different paradigm and incredib
by hellofunk 11y ago
I have used QML and JS React in different work projects, and I fail to see how QML is reactive. It is declarative but React is a different paradigm and incredibly useful, while QML is more traditional UI development dressed up in simpler syntax.
- trishume 11y agoYou're right in that it isn't the exact same paradigm as React, but it ends up working out the same way. You write a declarative description of how you want your app to look given a source of data, and then the UI updates when the data changes and you can bind UI elements to change the data. When the data changes, the UI automatically updates. React does this by generating the whole UI in a tree from a bunch of data and then diffing. QML does this by binding signals that trigger the UI to change whenever the data does. Yes they fundamentally work a different way, but the way you write applications and think about them is the same.