Ad/iklan :







Search.Pencarian Menu

Add text send email to rh3252705.adda@blogger.com or Click this (Text porn Will delete) | Tambah teks kirim email ke rh3252705.adda@blogger.com atau Klik ini (Teks porno akan dihapus)
Total post.pos : 13631+

[Go Make Things] State-based UI is an anti-pattern

Yesterday, I had a few conversations on Mastodon around when Web Components are appropriate versus a state-based UI library.

I generally prefer to handle my interactivity in two ways…

  • For stuff that gets saved or sent somewhere, an old-school form submit that gets progressively enhanced with JS when available.
  • For stuff that only lasts for the current session, old-school DOM manipulation.

For both of these approaches, I really like web components.

I started wondering when I would reach for a state-based UI tool instead. My go-to example used to be something like a todo list. They start simple, but get complicated quick.

But that complexity comes, frankly, from trying to manage too much of the UI with JavaScript.

I started digging through examples of various apps and demo code from the big state-based UI websites. In pretty much all situations, traditional DOM manipulation or forms and Web Components would, in my opinion, be a simpler, easier, more resilient way to build things.

I'm increasingly of the belief that state-based UI is an anti-pattern, with a very specific but limited use case.

Cheers,
Chris

Want to share this with others or read it later? View it in a browser.

Share :

Facebook Twitter Google+
0 Komentar untuk "[Go Make Things] State-based UI is an anti-pattern"

Back To Top