Reasons Why I Was Wrong Not To Use CSS in JS - Deepstash
Reasons Why I Was Wrong Not To Use CSS in JS

Reasons Why I Was Wrong Not To Use CSS in JS

  1. A more powerful CSS - JS instead of LESS/SASS gives us the same language we know
  2. Components - CSS in JS makes it simple to add specific CSS to a component. There is no dependency to add a link to the CSS file
  3. Less styling code - Keeping your styling in JS should lead to fewer styling code
  4. DRY - Many times the JS code needs access to information written in the CSS files
  5. Developer EXP - CSS changes are hot reloaded into the browser
  6. Gradual implementation - There’s no need for a 100% change in your codebase. You can introduce this alongside regular CSS files. 

3

3 reads

CURATED FROM

IDEAS CURATED BY

nicolegr

Arts administrator

The idea is part of this collection:

How To Get Rich Naval - Every Episode

Learn more about startup with this collection

Why happiness is the ultimate goal

The importance of creating value

How to create wealth in the modern era

Related collections

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates