3 ms·
Why are MFC and QT inferior to the Javascript way? I don’t know much about either.
by jpcooper 6y ago
Why are MFC and QT inferior to the Javascript way? I don’t know much about either.
- alquemist 6y agoOn top of my head: * Apps eventually degenerate in a mess of interconnected components triggering events on each other. Building UIs felt more like writing Verilog than writing functions. Nothing like chasing event ordering bugs through library components. With React I never saw 'enqueue a new event for component X' anti-pattern. All callbacks flow from children to parents in a fairly regular manner. * Related, there is no need to manually manage repaint events in React. Visual updates happen automagically. See, for example, https://stackoverflow.com/questions/952906/how-do-i-call-paint-event https://stackoverflow.com/questions/952906/how-do-i-call-pai... for a hair pulling session related to manual repainting. * On the ergonomics side, having a markup language allows for terse but readable definitions of component trees. I see 2020 Qt has introduced a markup language, this was not the case circa 2005. * Hooks give an extra layer of niceness. Declaring a component is as easy as declaring a function. Local state becomes almost as simple as declaring a local variable. * The inspector capabilities of modern browsers are very handy when debugging layout and styling issues.
- jpcooper 6y agoThanks for the detailed explanation.