--

It's actually better to parse the data outside of the component responsible for _rendering_ the data and just let the label render the string label passed in. This would actually give you both low coupling and high cohesion and get rid of that rat's nest.

--

--

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

Responses (1)