Reduce, Reuse, Recycle

Dan Ott
Dan Ott
Aug 9, 2017 · 1 min read

The sentiment I recall is that recycling will fix all our problems. “Reduce, reuse, recycle” was the parlance of our childhood, and it stuck in my impressionable little millennial brain.

Now my body is bigger, and my little brain still recalls this phrase, but today I’m thinking about React. Specifically, I’m thinking about how resuse is overrated. We overestimate how often we’re going to reuse things. Because everything is a component, we conflate the idea that everything needs to be reused. It doesn’t.

So here’s the plan:

  • Reduce the time spent trying to write the generic component. You’re betting on the unknown future, and you aren’t going to need it.
  • Reuse less than you think you should. A lot of duplication is incidental.
  • Recycle components into new components. Shamelessly copy/paste that render function. In doing so, you’ll see all the unique snow flakes that the panacea would need to serve. Then you’ll have enough information to write that reusable component based on the known use cases.

If you liked this article, be sure to share it on the internet’s social media. It helps my personal brand.

Dan Ott

Written by

Dan Ott

I CAN EVEN.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade