|
|
|
|
|
by MzHN
911 days ago
|
|
> As far as I know, there’s no way to set a dynamic width for an HTML input with pure CSS (please lmk if that’s not the case). Setting max-content doesn’t work, for example, because inputs are replaced elements that have intrinsic dimensions and behaviors that are not fully governed by CSS. This is the case currently, but when field-sizing: content; lands, you can do it with a single property. Also I get a weird feeling when something like React makes simple things hard and low performance. The solution of pouring a lot of time into debugging and optimizing (in context of React) feels even weirder to me. Sure, you might not need React here, but what if you do? What's the next best solution? Integrate the React "frame" with an "island" of vanilla? I don't know, something about having this issue puts me off in a major way. |
|
It was refreshingly simple and, despite being more verbose, it was clear what everything would happen once a certain event would happen. With a bit of clever refactoring dealing with elements factories wasn't too bad, even without a templating engine.
Not having to think "How is this going to be rendered by React, is it going to be efficient or trash performance" was great and I think it's intrinsic of picking a certain abstraction and we'll always have that.
Sure, the better the abstraction the less this problem happens eg. Solid is calling the component function once, which makes things easy to reason about