12 ms·
> Composabilty and abstraction Also possible without react with far less complexity.
by thunky 2y ago
> Composabilty and abstraction
Also possible without react with far less complexity.
- lmm 2y agoIt really isn't, unless you go full server-side session (with something like Wicket), and the latency of that is usually unacceptable these days.
- thunky 2y agoI think you and the sibling may have missed the requirements up thread: If you only need links, forms, and data tables
- lmm 2y agoIn my experience even something you thought was a basic form will usually have some kind of UI state (e.g. one input that then enables/disables another input).
- thunky 2y agoCan't that be done in one or two lines of jQuery?
- lmm 2y agoYes, of course. And then you add one or two more lines of jQuery. And then another few lines to deal with the client-side and server-side state getting out of sync. And then... Is putting in a couple of lines of JS that has no knowledge of the backend-managed good enough for small one-off pages? Maybe. But it's definitely not composable and abstractable, which was the original claim.
- thunky 2y agoI assume we're still talking about links, forms, and data tables. If the forms are so complex that we need React to manage them then it may be worth trying to simplify them a bit first. Or if the forms have to sync with the backend then there are other React-less options, for example: https://htmx.org/examples/value-select/ https://htmx.org/examples/value-select/
- lmm 2y ago> If the forms are so complex that we need React to manage them then it may be worth trying to simplify them a bit first. Some forms are simple enough that you don't need composition and abstraction, yes, no-one's denying that. > Or if the forms have to sync with the backend then there are other React-less options, for example: > https://htmx.org/examples/value-select/ https://htmx.org/examples/value-select/ Ok, now try composing that. What happens when you want to nest one of those inside another (i.e. have 3 levels of selection)?
- thunky 2y agoThe forms/inputs are composable on the backend where the state is managed and the html is produced. Here's the most dynamic form I can think of: https://www.globalgolf.com/golf-clubs/1064148-titleist-tsr2-fairway-wood/ https://www.globalgolf.com/golf-clubs/1064148-titleist-tsr2-... Any input change triggers any/all other inputs to change. Looks like they send the entire page each action, no React, yet the user experience is much better than the typical competitor site where they've overengineered the whole front end. Their faceted search is nice too: https://www.globalgolf.com/golf-clubs/used/titleist/fairway-wood/ https://www.globalgolf.com/golf-clubs/used/titleist/fairway-... Notice how when you add a filter it updates the URL. Breath of fresh air. And this is way beyond what I had in mind when I read links, forms, and data tables.
- lmm 2y agoI clicked a couple of inputs and it's now stuck on a loading animation of a glass getting filled with golf balls (been running for about two minutes now). So you've pretty much proven my point.
- klysm 2y agoI’ll believe it when I see it. I’ve used many many different UI frameworks, and react works the best out of all of them that I’ve tried.