Hacker News new | ask | show | jobs
by paavohtl 1730 days ago
What do you expect to happen? You ultimately have to store the state somewhere. Either it lives in the component, or outside of it, or you figure out some strategy to combine the two.
1 comments

Once you realize React doesn't work for complex components it loses its attraction. Web Components are conceptually way simpler and work well. See example:

https://github.com/wisercoder/uibuilder/blob/master/WebCompo...

Simpler? I don't see it. That looks way more verbose than a React equivalent component I would write.
I don't really see anything here that would be massively more complex in React. And besides, I've been hurt enough times by manual DOM manipulation to never want to do it again for interactive UI. It's a maintainability nightmare.