4 ms·
I also enjoy declarative UI. I hated imperatively building up the interface with jQuery, even with the helpers it just felt so tedious. This library is my attem
by danielvaughn 2y ago
I also enjoy declarative UI. I hated imperatively building up the interface with jQuery, even with the helpers it just felt so tedious. This library is my attempt to have my cake and eat it too.
Like I love being able to just write <div><p>hello world</p></div> in my javascript, it feels very nice. At the same time, with React I absolutely hate it when I do things that are inherently imperative.
A prime example is the following: I have a list of items that can be named by the user, so each item's display name will be a text input. When the user clicks the "create new item" button, a new item is added to the list, and the text input of the new item is immediately focused as soon as it's added to the DOM.
^ doing this in React sucks.
- gedy 2y agoThe only thing that is awkward imho is the focusing, the rest is a really good fit for declarative, e.g. here's your list of "things", render a UI for each.