I'd love to see React and Qt talking to each other.
I have my fair share of Haskell experience so I get the benefits of statelessness. But I don't necessarily think it's a silver bullet for UI.
But at the very least this is not React-specific.
With React you don't have a template. Every change generates a new virtual-HTML page, and then a diffing algorithm figures out the cheapest way to update your existing HTML with the changes. That makes things far simpler--your renderers are just HTML-generating functions, not some magical view-view_model thing that has its own syntax and workarounds for its limitations. UI is more testable because you can verify the actual HTML output, not just view_model state.
Would love to see something similar to React on other GUI platforms as well.
In QML one has QML components, which are JSON syntaxed files that can include other components and Javascript code. A component can be anything from a UI widget to a a camera object that can be used to take pictures, etc. QML encourages model-view programming which is a proven pattern used in the best UI frameworks on pretty much every platform. Nothing magical or limiting about it.
And is easier to bring web devs onto desktop app development.
And is faster to prototype.
And is probably a better way to develop desktop apps.
</kool-aid>
See eg https://en.wikipedia.org/wiki/Declarative_programming#Functi...
But it's a strict subset: config files are declarative without being functional. Raw data is declarative without being functional. One could argue that imperative functions are declarative too: "This C code is the declaration of what steps to execute in what order". So the definition of declarative can be a little fuzzy around the edges, but pure functions are most certainly declarative.
Anyway, QML is most certainly declarative, however it's still not functional because there's no functions.
Note: I really don't mean this in an inflammatory way; it just feels like people are rediscovering the cool stuff about Qt and reimplementing it but worse.