Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
Are there any equivalent of Qt style loosely coupled "Signals and Slots" based JavaScript UI library? Qt allows widget/ components to be connected to each other with a pub-sub type of system where the emitter of the signal really need not care who the consumer is. While, IIUC, most JS libraries follow a hierarchically coupled state passing system where sharing of state happens through props/ passing down from parent to child components with lifted state etc., Was wondering if there are any JS libraries which operate in the style of Qt event driven signal-slot connections as a primary paradigm.
Not sure how it works in Qt, but in regular React you'd just use a shared Context that all the components and their children can access. That way you don't have to explicitly pass props and setters and getters back and forth.
The first thing that comes to mind is that Qt now has a WebAssembly port[1] using Emscripten[2], so depending on your use-case, you could possibly just run Qt on the Web platform and avoid the need for a JavaScript framework entirely.
[1]: https://doc.qt.io/qt-5/wasm.html
[2]: https://emscripten.org