You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello to everyone! I know that naming convention for the React components are not fixed, but I have situation that confuse me. I want my projects to have multiple different buttons. I prefer using BEM naming convention, but I don't know is it good to use for Component naming or just for CSS className? For me, the following will be acceptible:
I saw it quite frequently that people use something like "PrimaryButton", "SecondaryButton", but for me this look inexhaustible -> for me better will be "ButtonPrimary", "ButtonSecondary" since the "Button" is BASE.
Also, should BLOCK be used in naming convention instead of MODIFIER, like:
Unfortunately, this issue tracker is for reporting bugs in React, and is not a support forum for using React and we don't offer opinions on patterns like naming conventions. We want you to find the answer you're looking for, so we suggest posting one of the Community Forums: https://react.dev/community
Hello to everyone! I know that naming convention for the React components are not fixed, but I have situation that confuse me. I want my projects to have multiple different buttons. I prefer using BEM naming convention, but I don't know is it good to use for Component naming or just for CSS className? For me, the following will be acceptible:
I saw it quite frequently that people use something like "PrimaryButton", "SecondaryButton", but for me this look inexhaustible -> for me better will be "ButtonPrimary", "ButtonSecondary" since the "Button" is BASE.
Also, should BLOCK be used in naming convention instead of MODIFIER, like:
The text was updated successfully, but these errors were encountered: