News for hackers. Stuff that matters.
Re:React, Solid, Htmx by PaulHoule on Friday April 12, 2024 @11:10AM (#40013842)
... I remember inventing signals circa 2005 for a knowledge graph editor I worked on in GWT back when I didn't care about knowledge graphs. Not long after that I was using similar concepts to develop a complex Silverlight decision support application for sales territories.

I'm still a little appalled that people have forgotten how to make HTML form applications like we made in 1999 and frequently use React for things that don't really need it. React has, I think, one of the most elegant methods of implementing a widget set ever invented (sure beats XAML, FXML, Visual Basic, etc.) but it doesn't support a real answer to maintaining application state that would be adequate for applications as complex as RIAs made by early adopters in 2005.

My favorite use for React is

https://aframe.io/

which works like a cross between VRML and Unity Framework. Here you can easily build a virtual world that people can experience with desktop, mobile and VR headsets. Something you can't do with HTML forms!

I have a few side projects based on HTMX but I am pretty sure we will see something like it but better soon. In particular back end frameworks need to be updated for the new reality. Often you have a "component" like a dropdown box which can either be drawn as part of a bigger page or updated on its own and you really need some way you can reuse the HTML template for those purposes and hopefully also reuse associated code that does database lookups and such.

Re:React, Solid, Htmx by williamcotton on Friday April 12, 2024 @01:20PM (#40015315)
I swerved out of the way of the Flux architecture that took over the mainstream and kept using “uncontrolled” forms and a much simpler and more sane approach to state management. You know, treating a view as a view.

My current approach is using F# and Fable to compile to a React app that uses parallel client/server express middleware to support the same code handling a client without JS enabled as the SPA that handles when the client does have JS.

https://fex-template.fly.dev/