“Well that’s just silly.”
Kenneth Chung
11

I use constants a lot in my code so I’ve always got them imported anyway. Which means I have a reference to the actual path for an icon; in that case it makes sense to just pass that path to the icon, not tell the icon where to go and get the path.

If I didn’t always have constants available, then yeah, I would probably be happy just storing the icon strings in the icon component and passing it a string.

Like what you read? Give David Gilbertson a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.