3 ms·
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 strat
by paavohtl 5y 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.
- flowerlad 5y agoOnce 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/WebComponentsDemo/elements/ZxListEditor.tsx https://github.com/wisercoder/uibuilder/blob/master/WebCompo...
- paavohtl 5y agoI 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.
- crooked-v 5y agoSimpler? I don't see it. That looks way more verbose than a React equivalent component I would write.