That will bring some load to Box.js as it will need to know about these props.
If the overall output of the text components remains the same — meaning that at the end they still return text with the same structure — but the props change, you can do something like that:
That will bring some load to
Box.js
as it will need to know about these props.If the overall output of the text components remains the same — meaning that at the end they still return text with the same structure — but the props change, you can do something like that:
Or render (not assign)
<TextComponent />
as part of the Box's conditional logic. It is a matter of taste.