4 ms·
I like the cut of your jib! I recently inherited a project with nested components and inheritance and all these insane levels of abstraction and it's impossible
by bigmanwalter 7y ago
I like the cut of your jib! I recently inherited a project with nested components and inheritance and all these insane levels of abstraction and it's impossible know what's going on anywhere. The crazy part is that all this abstraction is hiding incredibly simple HTML underneath it all, and the components are rarely used in more than one place.
Anytime I need to do some real work on this project, it's easier to just replace the call site of the component with the final HTML output, and move any required logic to the top level.
Turns out that across the multiple call sites, the final HTML output isn't really the same and this forgoes all the messy conditional logic and awkward data massaging that the original developer included.
As far as buttons go, the easiest is to just use
<a href="#" class="button">Click Here</a>
and
<a href="#" class="button button-primary">Click Here</a>
everywhere. Look at that, turns out CSS is a component framework already ;)