JuanVillegas95 / PurrfectTiming

PurrfectTiming is an innovative scheduling app that transcends time zones to help synchronize schedules globally. Currently under development.
1 stars 0 forks source link

Over 200 classes were generated for component #9

Open JuanVillegas95 opened 2 months ago

JuanVillegas95 commented 2 months ago

When you use styled-components with dynamic properties (like changing styles based on props), each variation generates a new unique class name. If you have a component that frequently changes styles dynamically, it can lead to a large number of generated classes, which can slow down rendering and increase the size of your CSS.

To mitigate this, styled-components recommends using the attrs method with a style object for styles that change frequently. This way, styles are directly applied as inline styles rather than generating a new class each time

JuanVillegas95 commented 2 months ago

Image