Live data from Hacker News

Things I wish I knew about state management when I started writing React apps

medium.com

331–335 of 335 posts

Re: Things I wish I knew about state management when I started writing React apps

#331
post #318

Earlier quoted context omitted.

GUI designers of the RAD era were much easier than Photoshop or Flash, and certainly easier than writing it out by hand. That's precisely why they became so popular.

But why didn't they stay popular? Did the Flash disaster cast fear into people? Did Web-tech based systems perform so much better, business wise, than native desktop apps?

The most popular frameworks with the best tooling weren't cross-platform. VB, Delphi, .NET/WinForms (and later WPF) were all Windows-only. Delphi briefly played with Kylix, but it was very messy.

Then you had Qt, which is a very Delphi-like take on GUI in C++, and was cross-platform - but it didn't have the integrated tooling on par with the other stuff, and of course the language being C++ raised the learning bar significantly.

Qt is much better these days, thanks to Qt Creator - although C++ is still a stumbling block there. But in the meantime, web apps took over - and that was before stuff like React. I don't think that had anything to do with ease of development, but rather with ease of deployment (or rather lack of it) - it's much easier to get people to use your app right there in the browser than it is to have them download and install it. So web won not because of its technical superiority, but despite it - and then dragged the desktop down (Electron etc) as a result.

Re: Things I wish I knew about state management when I started writing React apps

#332
post #80
post #8

What's the deal with the recommendation to use some library for managing forms? I've been working with React almost since its initial release and I've built some pretty complex forms... yet form libraries remain the one thing I've never really seen a need for. At the very least, using something like formik shouldn't be a necessity. There should be some qualifier that it's only really needed for very complex forms. Or…

Don't overthink it. Native HTML5 elements come with form validation and even a way to serialize (!) and submit form data w/ action and method attributes. (To implement the same as React components would be a 3 month project coming with a 1 GiB node_modules dir.) The only time you have to add JS bloat is for date pickers and time pickers which aren't supported on Safari yet (and you can user agent sniff for this). Blo…

Thank you! I don't know why ValidityState is not more popular, I was shocked to learn about it recently: https://developer.mozilla.org/en-US/docs/Web/API/ValiditySta...

Re: Things I wish I knew about state management when I started writing React apps

#333

Earlier quoted context omitted.

It is pretty much the same, except there is no explicit loop and calls to wait for events written in JS/React code. Javascript itself runs a loop, instead of polling for events, you define events handlers, and DOM/React handles "redraw anything that needs it" part.

Just to be clear, the loop isn't explicit in a desktop toolkit either. You do not poll for events, and the toolkit handles the "redraw anything that needs it". So for example, in GTKmm (the C++ wrapper for GTK+), the event loop looks like: Gtk::Main app; ... app.run ();

Ah, it was quite a while since I looked at desktop GUI apps... It used to be just like OP described - you define logic, and then run pieces of it in the loop. It makes sense to abstract that away to standardize the process.

Re: Things I wish I knew about state management when I started writing React apps

#334
post #318

Earlier quoted context omitted.

But why didn't they stay popular? Did the Flash disaster cast fear into people? Did Web-tech based systems perform so much better, business wise, than native desktop apps?

The most popular frameworks with the best tooling weren't cross-platform. VB, Delphi, .NET/WinForms (and later WPF) were all Windows-only. Delphi briefly played with Kylix, but it was very messy. Then you had Qt, which is a very Delphi-like take on GUI in C++, and was cross-platform - but it didn't have the integrated tooling on par with the other stuff, and of course the language being C++ raised the learning bar si…

I remember in the 90s there was a push for putting things on the web to avoid licensing fees and installation, despite how limited html and JS were. And there was the temporary popularity around Java applets to provide a more rich web experience prior to Flash and then finally HTML 5.

Re: Things I wish I knew about state management when I started writing React apps

#335
post #291

May I ask React guys what’s wrong with parallel controller tree and (virtual) view tree which React tries to avoid (and, in my opinion, creates a bunch of in-club issues on a way that didn’t exist outside of its paradigm)? I’m talking about this desktop mvc adapted to hyperscript approach: class AppCR extends CR { ctor() { this.db = new RemoteDB this.sidebar = new SidebarCR this.content = new ContentCR(db) this.val =…

[deleted]
Post reply on HN