Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
1–6 of 6 posts
Re: Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
#2Re: Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
#3Re: Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
#4That being said: If you're dead set on this paradigm you can implement this easily yourself. Create a bootstrapping function that modifies a prototype or class in order to provide functions to register signals and slots and use them wherever you need them.
If you use TypeScript you could even use Decorators (e.g. "@Signal" or "@Slot") which are just higher order functions to have some syntactic sugar like the QT macros.
Re: Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
#5Re: Ask HN: Qt style "Signals and Slots" based JavaScript UI library?
#6I'm of the opinion that this is bad design because it makes it very hard to reason about the consequences when refactoring a large codebase. It's kind of like reactive global variables. There are legitimate reasons when to use them. But not as a general design principle. That being said: If you're dead set on this paradigm you can implement this easily yourself. Create a bootstrapping function that modifies a prototy…