I’ve been trying to follow the same best practices in my components, but I do one thing differently…
Philip Damra

Hi Philip,

To make sure I’m understanding you correctly, you’re referring to having a subcomponent whose render functions returns different elements based on the props? I think that’s a great approach — but we still find we have to use conditionals within components themselves so I wanted to highlight the IIFE way :)

Show your support

Clapping shows how much you appreciated Scott Domes’s story.