darray-queens / Project-Atelier

0 stars 2 forks source link

Styled Components #72

Open stevkim opened 1 month ago

stevkim commented 1 month ago

When creating styled components you want the styles to live in a separate file.

Create all your styled components (related ones together) in a separate file and import them as needed. This also allows you to be more 'dry' and you're able to extend styles from other styled components. Which is why styled components is used. https://styled-components.com/docs/basics#extending-styles

React components should ideally be only 50-100 lines of code.

stevkim commented 1 month ago

Looks like some components are following this design

Might be a consistency thing. - Ideally, lets keep CSS out of React components, if possible