3 Replies
You're prematurely optimizing
Write whatever was easiest and fastest for you
And the reason why I say this is because most likely, you're project is small and static, so there's no reason to think about future use cases until it pops up. If you find in the future that you need additional specificity/describers because you have sections that have different markup, then go ahead and add classes for that. Does that make sense?
I like to put classes on everything (in a real project) to keep the specificity even across the board
when I plan a component (rather than just guessing what is required), I will also break down the components by name and a proposed element type
giving styling to a section-title is super easy for me to read and to maintain.
making me check through the element for what is a p or span etc. and mentally put it together is not
realistically the use of classNames will allow you to change the element type without making life difficult for you.
i.e. you have to change the heading level.
or you wrap your p's and spans in a div for flex purposes
that all being said, your p's should probably be styled in a general way and shouldnt be unique to a section without very good cause.