I think when someone sees the usage of Banner, they don't know how the component works. If that's used just for visibility, how about adding a property like visible to Banner? That seems more clear in that case.
Applying Tell Don't Ask, we avoid querying and depending on the internal state of a collaborator object. Instead, the owner of that state -- or behavior, should decide what to do.
Anyways, this is good. Thanks for your post :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I think when someone sees the usage of
Banner, they don't know how the component works. If that's used just for visibility, how about adding a property likevisibletoBanner? That seems more clear in that case.Anyways, this is good. Thanks for your post :)