Re:I’ve become worse at programming
by BigJono on Tuesday May 23, 2017 @11:34PM
(#14407433)
I've started doing this as well, and I'm finding often my solutions end up being simpler, better and have less dependencies than the go-to solution anyway.
For example, here's a React 'collapse' component, as people commonly use for accordions.
It has 1/10th the code of rc-collapse (the 'go-to' solution it seems), and 4 less dependencies. And it's simple enough that basically any competent Javascript programmer can edit the code if they want slightly different functionality.
For example, here's a React 'collapse' component, as people commonly use for accordions.
https://gist.github.com/JonathonAshworth/b401810b965149348d0...
It has 1/10th the code of rc-collapse (the 'go-to' solution it seems), and 4 less dependencies. And it's simple enough that basically any competent Javascript programmer can edit the code if they want slightly different functionality.
Importing NPM modules for this stuff is madness