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
Know your components. Look at existing components before you create a brand new one. It is really fun to create new components but please ask yourself or the designer if we already have a component that might do the job first! Maybe you can create a variant of an existing component or just use it out of the box? It is important to evaluate the complexity of creating a variant. Sometimes it is smarter to create a new component. Discuss with your teammates!
DRY - Don't repeat yourself - Use inheritance to share style between similar components.
constButton=styled.button` color: papayawhip;`;/* Repeating property that already exist in similar component ๐ */constProgressButton=styled.button` color: papayawhip; background: white;`;
Export the component as a styled component. This way we can specify context / layout specific properties in a parent component (Article, Page, Screen, View, Route etc.).