16 ms·
What differentiates front-end frameworks
- sublinear 3y ago> Instead, we’ll go directly to the crux of the main problem front-end frameworks set out to solve: change detection, meaning detecting changes to application state so that the UI can be updated accordingly. Change detection is the fundamental feature of front-end frameworks, and the framework authors’ solution to this one problem determines everything else about it: developer experience, user experience, API surface area, community satisfaction and involvement, etc., etc. I disagree. Sure that's at the core of how a framework is written, but all the developers really care about are the interfaces. The user doesn't care at all unless it doesn't work or is annoying to use. If your interfaces are dictated by the way the event loop is written, there's something wrong that needs to be decoupled. Events should be generic and interfaces should be arbitrary to what developers want.
- phailhaus 3y agoSince it's at the core of how a framework is written, it affects what the developers must handle and therefore the interfaces that are possible. If you know how a framework handles change detection, you already know something about the interface it must expose.
- croes 3y agoWhat about Solid.JS?
- grayrest 3y agoSolid works differently in that the output is implemented as a side effect of a subscription to a piece of state. Simplified, think of a signal as an event emitter and a variable with a getter and a setter. Using the getter adds its downstream effects–most notably adding/modifying DOM nodes–as an event listener. Using the setter updates the state and triggers the event listeners. Most other frameworks here (all? not sure about Vue) will invalidate and rebuild an entire component subtree if a piece of state in them changes. The solid runtime doesn't care about components so changing a piece of state high in a subtree will only update the piece of the DOM directly depending on that state and not any nodes that were authored as sub-components.
- rubymamis 3y agoQML wins with bindings and signal and slots! (In this example the the text property of the Text componenet is binded to count, so whenever count changes the text changes). ``` property int count: 0 Button { onClicked: { count--; } } Text { text: count.toString(); } Button { onClicked: { count--; } } Button { onClicked: { incrementLater.start(); } } Timer { id:incrementLater interval: 1000 onTriggered: { count++; } } ``` Better in so many ways.
- em-bee 3y agoyou can do the same in aurelia: counter.html: <template> <div>${count}</div> <input type="text" value.bind="count" /> <button click.delegate="inc()">add one</button> <button click.delegate="counter--">subtract one</button> </template> counter.js: export class Counter { constructor() { this.counter = 0 } inc() { this.counter++ } }
- onsclom 3y agoHaving used both QML and Svelte, I enjoy Svelte a lot more. The reactive APIs are very similar, just declare variables, mutate them, and use them. But Svelte is much nicer for many reasons: 1. It uses modern JavaScript and not some limited custom ES5-like JavaScript 2. Svelte can be used with TypeScript so your UI code can be statically typed 3. The integration with Svelte and VSCode is much better than QML and Qt Creator (the big thing is that IntelliSense is much better at analyzing JavaScript code than whatever Qt Creator uses) 4. Having an actual live reloading dev server is so much nicer than compiling and running for every change 5. Svelte has much better documentation than QML These are just the first things that came to mind, but I could probably keep going for a while. Do you think I'm being unfair to QML? And/or have you used Svelte?
- dadsquad 3y agocan't forget library support.
- austin-cheney 3y agoThat is putting the cart before the horse. Frameworks solve for a fundamental business problem well before ever approaching any technical problems. A front-end framework is an architecture in a box, a pre-designed composition. There are a couple of business reasons for that: 1) Provides a common externally defined abstraction, so that developers require less training and are more disposable. 2) Supplement skills of unskilled developers The reason frameworks do not primarily solve for change detection, is because the browsers already provide that. Frameworks provide an additional solution riding on the browser's solution as an abstraction. Framework don't even really solve for a common set of standards either, because the browser provides that too. I really want to say that major frameworks provide for a more narrowly construed set of APIs and design approaches, but the APIs on modern frameworks are absolutely massive, so I cannot say that either. So... frameworks are really just an abstraction to achieve a particular design approach, whether good or bad.
- whatshisface 3y ago3) Saves you from having to rewrite dataflow and state management code with every project. (Saving time is a business factor.)
- austin-cheney 3y agoThose are trivial to solve for and then once you do solve for it its just a matter of copy/paste from project to project with about 10 minutes of rewiring. That costs dramatically less than spinning up a large framework project to project, but frameworks save on training time because most developers cannot solve for these problems on their own.
- deleted 3y ago[deleted]
- quest88 3y agoYou're describing an inhouse framework
- MauranKilom 3y agoNot a frontend person, and unlikely to become one anytime soon, but maybe someone can shed some light into the downsides of Svelte? The article fails to mention any (it's apparently "win-win"). Presumably if Svelte were the be-all-end-all of front-end frameworks, it would dominate soon enough?
- pmarreck 3y agoThe problem is, there is no panacea in technology, only tradeoffs. Svelte does look pretty sweet though.
- Aerbil313 3y agoWell it is very new. React has a massive inertia, so it dominates for now. I do FE work and see Svelte is gaining popularity.
- bobolino123 3y ago2016 is not very new
- deleted 3y ago[deleted]
- karaterobot 3y agoProbably as much as the 3 year difference is the fact that Facebook made and evangelized React. I know I didn't hear about Svelte until 2018-2019, but I knew about React within a few days of its release.
- boringuser2 3y agoActually, that's very old in frontend years.
- tl 3y agoReact: - had a 3 year head start on Svetle (2013 vs. 2016) - has major engineering orgs behind it. Facebook started it. Microsoft makes it work with Typescript. - is easier to get started with. While JS-compilation is common, it's required for Svetle. Svelte isn't free of pain points. Like any form of magic, it has edge cases. It's better but not "better enough" to de-throne React.
- AceJohnny2 3y agoOfftopic: The cursive italics are apparently a feature of the Victor Mono [1] font used for the full page. While it'd be amusing in Tumblr context (where cursive is used for hyperbolic emphasis), I can't fathom why one would consider it in a code context, but to each their own... You can change it (at least on Safari) by going into developer tools, clicking any node, and removing "Victor Mono" from --font-family [1] https://rubjo.github.io/victor-mono/ https://rubjo.github.io/victor-mono/
- jbs55 3y agoThis also threw me off
- 8organicbits 3y agoOne of the first things I do on a new browser install is to disable web fonts. I've never seen a site where they improve things, often they flicker in after page load, which is jarring.
- andrewl-hn 3y agoVictor is also an extremely narrow font. The author of the font motivates it as means to squeeze more code per line. Not only it would make longer lines more tolerable, but also for short lines it reduces the eye movement needed to scan the line. However, I personally find the narrowness more tiring for the eyes to the point that it is even more distracting than the cursive.
- dustingetz 3y agofirefox reader mode; works on mobile too
- timetraveller26 3y agoYeah, I would prefer my custom font with comic italics.
- jasmer 3y ago[dead]
- dezmou 3y agoReact is not reactive at all, the "state" management is you calling a function "setState" to re-render the component. And I find manual render very usefull and once you do it, you can have a global state as simple as a global object, no need to use useState anymore. https://github.com/dezmou/useRender https://github.com/dezmou/useRender
- boringuser2 3y agoThis is extremely inadvisable for numerous reasons and goes against the entire design philosophy of React. In short, injecting a naive render function over the react virtual dom calculation is wildly inefficient.
- dezmou 3y agoThis piece of code only rerender the component as if you do a setState, in fact it does a setState under the hood, maybe the word "render" is missleading.
- Capricorn2481 3y agoThe reactive part is every component getting that prop will update versus needing to write a function in jQuery to manually update the inner HTML of those components
- dezmou 3y agoStates are scoped to a component, how "every" component that get the prop update ?
- Capricorn2481 3y agoIf you pass a prop to a child component, it will update whenever you change state If two unrelated components are consuming the same context, it will update when that context updates. Using Zustand, there's virtually no overhead to this and it's extremely reactive
- yakshaving_jgt 3y agoSo the single most important factor that differentiates front-end frameworks is DOM diffing performance? Well, IIRC, Elm is faster than all the examples given, and yet front-end developers find Elm to be weird and frightening. So I’m not sure I agree with the premise of the article. I also don’t agree that there can be so many valid answers to “Find a change detection paradigm that fits the needs of your application”. Surely everyone just needs the one that is most efficient and least broken.
- mark38848 3y agoDon't you find a language without higher-kinded types or type classes frightening, too?
- yakshaving_jgt 3y agoFunny :) I’m not sure how to answer this question. Any serious answer would spoil the joke.
- deleted 3y ago[deleted]
- avereveard 3y agoNyeh. The most important factor in a framework is debuggability if the stack trace is messed up and the frames are polluted by a hodge podge of state variables I want nothing to do with it. The rest is nice to have.
- ChrisArchitect 3y agoFrom June since no date on it Shared by the dev https://news.ycombinator.com/item?id=36403909 https://news.ycombinator.com/item?id=36403909
- pmarreck 3y agoTechnical blog posts without a date should be illegal
- pc86 3y agoBut how will I drive traffic to my evergreen course funnel with publication dates all over my articles? The FA actually doesn't do this, but a lot of things (including those that do very well on HN) do for exactly this reason.
- exac 3y agoUsing the current date for the article /s There must be a browser plugin that offers the date a website was first indexed.
- jbs55 3y agoI’m not technical enough for this. I thought a front end was about the user.
- jfengel 3y agoIt is. But the hardest thing about the user is interacting with them. When the user does something, something in the program changes, and you have to change the screen to match. Or updating the screen when some information comes in from outside (like an API call). That's basically what the article is about: keeping state in synch with the user interface. There are a bunch of different ways to do it. TFA compares a few of them. A front end has to do a lot of other things, and it's kinda overstating it to say that state is "the single most important factor". But maybe not by much.
- deleted 3y ago[deleted]
- colordrops 3y agoWorthless article if it doesn't include Web Components or Web Component-based frameworks like Lit. Google, Adobe, Netflix, SpaceX, and many other companies use standards-based components, so it's not some niche thing. Funny that the "framework" that will probably outlast everything in the article isn't even mentioned.
- alana314 3y agoThe problem I have with react is that if I set a variable using a hook, it's asynchronous and not immediately available in my code. It's nice for updating the DOM but causes me lots of race conditions.
- joshribakoff 3y agoThis is by design, the race conditions are caused by your implementation not complying with the constraints it was designed for you to stay within. Use a local variable (not react state) if you need to store a value and read it back synchronously. Use a useEffect hook if you need side effects to run when react state changes, and finally useMemo if you need derived react state
- boringuser2 3y agoThis is an issue of you not understanding how to properly manage the state of your application, not React. It's very likely that you're using effects improperly.
- throwaway4837 3y agoEffects are way too easy to use improperly. I used to be a fan of useEffect when it came out because of its concision, but after working with countless devs/agencies, it's clear that most people misuse it. The rules of useEffect are inelegant, and creating readable state machines with useEffect is very hard. You end up with spaghetti code either in your custom hook, or directly in the component. While most components need 2-3 effects rather than 20, useEffect is not a scalable way of managing state IMO.
- soledades 3y agohttps://react.dev/learn/you-might-not-need-an-effect https://react.dev/learn/you-might-not-need-an-effect
- jchook 3y agoVanJS[1] seems to have a somewhat different approach. The entire framework is surprisingly simple and easy to understand. In benchmarks I've seen it perform well, even better than SolidJS. 1. https://vanjs.org/ https://vanjs.org/
- bob1029 3y ago> There are tons of blog posts on the internet about how frameworks differ and which one to pick for your next web project. You can also just not pick one. MDN is my anti-framework.
- kaishiro 3y agoMDN has a great series of guides on front end frameworks :) https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks https://developer.mozilla.org/en-US/docs/Learn/Tools_and_tes...
- nsxwolf 3y agoYou know what I've always wanted in a front end framework, as a back end developer that sometimes is forced to work on front end tickets? I want a development build mode that generates some kind of project metadata where I can just point to something on the screen and get a report of all the interesting files in the project that are responsible for what I'm seeing: * API calls * Templates * CSS * Controllers, etc. My usual technique of finding some text content, looking for an i18n file and working my way backwards is tedious.
- RandallBrown 3y agoApologies if you're aware of this already but every browser has a web inspector built in where you can point and click on something and at least see the HTML and CSS associated with it.
- commotionfever 3y agoand you can also click on a request in the network tab and find out the line of code triggered it, including callstack also with react dev tools you can click somewhere on the page and see the react component, it's props, etc. similar tools are available for other frameworks
- rubinlinux 3y agoAnd vuejs has a browser plugin which can sort-of show you which components call which components to get there.
- Izkata 3y agoReact and Redux both have similar addons as well, to inspect the component tree and to see the state changes over time (and even roll back; "time travel debugging" has been one of Redux's primary features since it was released).
- nine_k 3y agoDirectly surfacing the effects involved, e.g. HTTP calls via all the event handlers through layers of nesting, would indeed be nice.
- r_singh 3y agoThis website loads staggeringly fast (much faster than HN and my own static site which uses Gatsby and is hosted on Cloudfront). What’s the reason for this?
- sambroner 3y agoReally impressive stuff. Seems to have slowed down slightly now that it's on the front page, but blazing fast when I first opened it.
- 8organicbits 3y agoInteresting. I'm seeing something slower. Pagespeed shows 2.7 seconds: https://pagespeed.web.dev/analysis/https-themer-dev-blog-the-single-most-important-factor-that-differentiates-front-end-frameworks/u10rfjgwkz?form_factor=mobile https://pagespeed.web.dev/analysis/https-themer-dev-blog-the...
- deleted 3y ago[deleted]
- sambroner 3y agoEven just an eye-test shows it's much faster than that for me. Pagespeed shows .6 for desktop, but locally I'm seeing frames loaded under 350ms. I would have guessed much faster, but I guess the devtools don't lie.
- 3y ago
- emorning3 3y agoTotally disagree with this. Change detection is nothing but a hack to get around the fact that interacting directly with the browser DOM is very slow and blinky. Imagine a world where interacting directly with the browser DOM didn't suck, then none of these libraries would exist. The crux of the problem is that the browser immediately reflects changes to the DOM to the screen. And when you make a bunch of changes to the DOM you immediately see a bunch of changes happen, with portions of the screen being blanked out, and layout changes happening, and a whole bunch of other nasty stuff happening immediately, which all sucks. And updating a physical screen is slow too, double sucky. Change detection is a technique for minimizing updates to the DOM to avoid the suckiness. I implemented word processors, and I've used a technique called 'double buffering' to rerender complete pages off-screen, fast. And then update the screen smoothly. If we used a proper word processor engine to display our UIs instead of a browser engine then we'd have no need for React etc... After decades, Chrome finally has a rational equivalent to this technique called the View Transitions API. My hope is that the days of doing change detection are numbered and we can finally leave all this change detection crap behind us.
- boxed 3y agoThat's not nearly all there is to it. If the DOM was fast and you could control redraws, it would still be horrible. A performant big pile of mud is still a big ball of mud.
- crooked-v 3y agoFor example, there's the way it's still impossible to pass data between native Web Components without stringifying it first.
- spankalee 3y agoThis is an absolutely stunningly false and ignorant statement. I can't believe it's still being repeated. Web components are objects and they have properties that can be set. The entire web components community - which includes the developers of apps like Photoshop, Reddit, Chrome, Firefox, and a lot more - passes properties down through trees of web components _all the time_.
- gatvol 3y agoNot a single mention of URLs, statefulness ...
- franey 3y agoIt is something that distinguishes them, certainly. As someone who switched from using Vue to React at my day job, dev tooling & editor support have been the things that stand out the most to me. React works well with Vite, which has helped make it easier to use, and I've been migrating projects away from Webpack + Jest to Vite + Vitest, which saves a lot of dependency maintenance. I definitely miss Vue 3's VS Code extension when I work in React, though.
- mgaunard 3y agoThere is only one important factor: the frameworks others wrote, and the ones you wrote yourself.
- tashoecraft 3y agoHaha, the anti angular bias in this is so strong. From getting things just wrong to presenting their own feelings as fact. Makes me discredit the rest.
- onion2k 3y agoI don't agree, because in my experience every framework is fast enough unless you're either past what it's capable of (you probably aren't) or you're using it wrong (you probably are). It is far more important to fine a framework that you like and that you understand, because then you'll write good code that the framework can run fast.
- mianos 3y agoI agree. Of course there is no 'single factor' for almost anything. So, going with the themes of attention seeking hyperbole, I would say the 'single biggest factor', is the ability to find and keep skilled developers in any of these top 10 frameworks. The differences mean nothing when the bigger picture is considered.
- sp332 3y agoWhat are you disagreeing with?
- plaguuuuuu 3y agoSome frameworks have nastier non-obvious footguns that make performance issues difficult to spot. Funny example, in Blazor, if you have a mouse move event, by default it will decide that your entire component including children needs to be rerendered whenever the mouse moves by a single pixel. Unless you change state management to manual or whatever.
- 12_throw_away 3y agoInteresting to compare these with the results on the js-framework-benchmark page [1] (with the usual caveats about benchmarking). Without actually running the numbers, qualitatively it looks like there are 3 performance tiers: VanillaJS (fastest); Vue, Svelte and Elm (often close to vanilla); and Angular and React (sometimes comparable, sometimes much slower). [1] https://krausest.github.io/js-framework-benchmark/current.html https://krausest.github.io/js-framework-benchmark/current.ht...
- ngFanboi45 3y agoYep. The author is making a big leap by falling into the "Angular slow" meme. In my experience it isn't, and it provides ease of use thanks to its bi-directional binding, as oposed to React's unidirectional binding. It is not the champion of speed though, might be even the slower out of the box, but still fast enough.
- spankalee 3y agoSvelte isn't a strict win-win. It requires a compiler, and forks of JavaScript and HTML. And it isn't actually very different from React or Vue anyway, and in fact quite a bit more limited than Vue (not necessarily bad). Saying: “I’ll figure it out for you at compile time.” —Svelte is just a non-technical, basically non-meaningful statement. You need to know _what_ it figures out exactly. What state and what state changes are observable? These things matter more than whether it's done at compile time or runtime. And I think the author is ascribing far more power "compile time" than what's actually happening. Svelte is not doing some kind of sound data flow analysis on your JS code to figure out what could change and rewriting your code to be observable (something not really possible anyway). It's using specific syntax conventions to make some variables into shallowly observable properties. And it adds "store" concept, which is more-or-less Signals as popularized in Solid, now Preact, and soon Lit and Angular.
- lnenad 3y ago> Svelte isn't a strict win-win. It requires a compiler, and forks of JavaScript and HTML. These points weren't touched upon by the author. He compared the frameworks from one perspective and one perspective only.
- ramesh31 3y agoUnpopular opinion, but I just simply don't care about performance benchmarks between frameworks at all. If thats something you're actually faced with, you should be writing your own perf specific code. The only thing I care about is support. Can I hire people that know this? Is it easy to onboard? Is there a ton of really solid open source plugins and packages compatible with it? Is there an LTS version? These are the only things that really matter day to day.
- beebeepka 3y agoThe way we do SPA is kinda nonsensical because we're fighting the browser. It would be great if we could simply change a value then see the result on the screen at the next tick. DOM is great but not ideal for truly dynamic stuff with lots of things going on, which is pretty much the worst case for the tech. Really dynamic apps can be really fast with canvas but I am not we have the tools to replace DOM websites just yet. Maybe in a decade.
- timcavel 3y ago[dead]
- heisenbit 3y agoI find looking at component level change detection without giving equal space to the store change detection and the integration between the two insufficient.
- theK 3y agoWhy doesn't anybody pick up elm in these comparisons?
- ngFanboi45 3y ago> Angular’s change detection is a disaster. The developer gets two suboptimal choices: (1) the slow and naive default implementation, or the complexity of managing change detection manually. This is completely wrong. The "naive" approach is the one you should always use, with the onpush strategy reserved for breaking certain cascading situations manually. But the default approach works perfectly fine, it is performant enough, and even more when compiled for production, as it runs only once (as compared to twice in the debug mode). The author is incorrectly assuming that the change detection is slow because it is automatic. That's the entire point of the framework btw.
- jeremycarter 3y agoWe've never had an issue with the Angular change detection. Large scale projects, multiple teams touching a modular front end. Its a win!
- throw310822 3y agoAgree. That part reeks of "that's what I've heard somewhere, never bothered to check". I work daily on angular projects of reasonable complexity and the performance of the automatic change detection is perfectly fine.
- acaloiar 3y agoThere are 10 types of front-end frameworks in this world; those that are htmx, and those that aren't.
- sgt 3y agoBut nobody seems to use htmx. There's a lot of momentum and eagerness in the frontend world to go full blown SPA because well.. that's the thing that is done.
- aluminum96 3y ago> To overcome the shortcomings of the default change detection paradigm, the Angular team is working on a new approach called Signals. Conceptually, signals are similar to Svelte stores (which we’ll get to later), and fundamentally, they solve the change detection problem the same way as React; the framework is taking control over the application’s state so that changes can be easily monitored and re-renders can be as efficient as possible. I radically disagree with this statement. Angular Signals (and signals in general, as in SolidJS) could not be more different from React's change detection model, and they are not particularly similar to Svelte stores either. In React, your component function is a render function, which reruns. React diffs the state object when `setState` is called, determining which part of the DOM to update. Signals-based solutions are generally much more fine-grained: the framework knows which portion of the DOM was affected by the signal, and does not need to diff the entire state object. This "surgical" approach requires more explicit state management on the part of the developer, through the use of Signals to wrap the application state. However, DOM nodes can be updated without doing a large, expensive diff. (As a corollary, the component function is typically a create function, not a render function.) The developer experience is quite different as a result.
- genuine_smiles 3y ago> and they are not particularly similar to Svelte stores either How does Svelte differ? I’m somewhat familiar with SolidJS, and had always assumed Svelte was somewhat similar.
- plopz 3y agoI'm not super familiar with svelte, but my understanding was that it solved it at compile time rather than run time.
- luketheobscure 3y agoThere are a large number of very incorrect statements in this article. > True to its de-facto tagline, change detection in React is “just JavaScript.” Then in the example, the author updates a variable with `setCount(count - 1)`. That's not "just JavaScript". Just JavaScript would be `count = count + 1`.
- zebracanevra 3y agoThe React code in the article has a bug. If you click "Increment later", then immediately click "Decrement", the counter will go from 0, to -1, then erroneously to 1. To fix this, the code for the "Increment later" button should be `setTimeout(() => setCount(count => count + 1), 1000)`. I don't believe any of the other frameworks have this specific problem.
- evanskool121 3y ago[dead]
- rglover 3y agoThere's another, often ignored differential factor for frameworks and that is ergonomics. All of the frameworks here require specific domain knowledge to pick up and understand. That knowledge typically involves confusing concepts (Svelte and Vue aren't too bad here) that waste a ton of developer time just to wrap their head around [1]. When I look at Angular, it feels like one of those contortionist boxes at a magic show. This is why I ended up building Joystick [2]. The amount of time I was wasting trying to reason through how a framework wanted me to do something vs. actually building what I wanted was driving me nuts (not to mention, having to watch people I was mentoring who had less experience struggle even more). [1] Meaning, beyond a trivial interface, any sort of complex UI is often (not always) burdened by the framework's lack of clear ergonomics. There's a lot of having to learn "why it did that" in the way of getting stuff done. [2] https://github.com/cheatcode/joystick https://github.com/cheatcode/joystick
- ChicagoDave 3y agoThe op forgot to tell you that if you use React, you have to add a slew of 3rd party libraries to make it work and no one tests every combo. This is called “unopinionated”. Angular is “opinionated” in that you don’t need to add anything. It definitely has a higher learning curve, but from an enterprise perspective, it’s a safer tool. And if you have so many things on a web page that performance is a problem, then I’d suggest you need a better user experience. You should never have a design that overwhelms the framework.
- insin 3y agoJust leaving this here (typed without having to look it up) for anyone else who's ever maintained large Angular app which got to a certain size and complexity before anyone _really_ understood what they were doing: ExpressionChangedAfterItHasBeenCheckedError
- djbusby 3y agoSurprised nobody, and the article, mentioned RiotJS. It's maybe less framework and more library but, it is easy to make these little web-components. It's also one of those setState and repaint types. My primary drivers is that is easy to bolt into existing projects - so one can gradually add more dynamic features without the mega-rewrite-all-at-once-to-new-tools dance.
- galaxyLogic 3y agoWhy can't we just use Model-View-Controller for change-detection? Views subscribe with the model to get notifications about changes to different "aspects" of the model. When they get a change-notification they update themselves by asking the model for its latest data for a given aspect.
- mickael-kerjean 3y agoThis is precisely the approach I started on taking to rewrite my oss frontend stuff: https://github.com/mickael-kerjean/filestash/blob/master/public/pages/adminpage/decorator_admin_only.js#L31 https://github.com/mickael-kerjean/filestash/blob/master/pub...
- vmware513 3y agoIt is Ember.js, beautifully solving this problem since 2012.
- dawnofdusk 3y agoLiterally just Angular if you use RxJS, which the author evidently thinks is too hard to understand and so dismisses it.
- mst 3y agorxjs (see M. Kerjean's sibling comment for an example) or mobx/mobx-state-tree can be used to implement something like that, and I've quite enjoyed both react+mobx and lit+mobx as a result. (googling 'thing mobx' where 'thing' is your preferred rendering system has results in quite a lot of cases)
- phailhaus 3y agoSounds simple, right? It fails horribly, because you lose control of how data flows through your application. One view triggers an update to a model, which will immediately trigger other views to render regardless of where they exist in the component hierarchy or whether there are more changes to make in tandem. This can cascade to other updates, and suddenly you're in a weird intermediate state caused by a race condition between two separate views that's incredibly difficult to debug. The reason why solutions like React are so popular is because it radically simplifies state management: data flows in from the top of the component hierarchy down. When a component makes changes to state, those changes are queued up for the next consistent render loop, which ensures that nothing renders in an intermediate state. An entire class of bugs, gone.
- whartung 3y agoPerhaps adrift a bit of the main topic, but curious if anyone with more than cursory experience with any of the mainstream browser front end frameworks and JavaFX could briefly compare and contrast them. I do not consider myself a front end person, but I’m slowly getting more adept with FX, more so as a hobbyist than professional, but have no experience with the browser systems.
- intellix 3y agoStop arguing about which framework has a developer experience that you prefer and just use Qwik which is the only one that changes the playing field due to resumability. You can argue over if you prefer React, Angular, Vue or Svelte but at the end of the day you're still shipping 1-3mb bundles instead of 1kb and resuming
- vmware513 3y agoThe best change detection framework is missing from the article. It is obviously Ember.js. It is just so elegant and simple.