4 ms·
It’s happening for a very particular reason imho. Frameworks like React create infinite ways one can structure and compose components. What once used to be a <S
by runawaybottle 6y ago
It’s happening for a very particular reason imho. Frameworks like React create infinite ways one can structure and compose components. What once used to be a <Select> can now become
<DropDown>
And or
<EnhancedDropdown disableEnhance={isEnhanced}>
And or
<MultiSelectWithAutocompleteAndSearchBar onlySingleSelectionAllowed={true}>.
Then you can compose all of those together into:
<ThisComponentMakesSenseToOnlyMeDropDown show={isDropdown && !Carousel && showCarousel}
totallyDifferentData={totallyDifferentData}
enhanceWith={<EnhancedDropdown>}
replaceWith={<CarouselWithNoDropDown> >
^ That’s where all the complexity is coming from. I will not even attempt to demonstrate my point by adding context and global stores into this.
Small bit of bitterness:
Then you make a nice little storybook component, and a jest snapshot to show that this is a nice ‘testable’ component, you know, like really dot your I’s and cross your T’s.
Back to my point:
This is powerful in the purest sense, as it’s super flexible, but also powerful in a way that can create insane amounts of complexity with different mindsets contributing. Not everyone sees a regular <DropDown>, some see all kinds of things.
I think a lot of the fragility (perhaps the better word is instability) comes from this power (chaotic, out of control power). I hope web components at the very least creates a standard list of UI components (the browser doesn’t even have a default modal yet, still rolling with alert(), and if you leave it to the wider community to make it, we will end up with <AbstractModal>).