JavaScript mxstbr.com

Why I write CSS in JavaScript  ↦

You might be on the fence with CSS-in-JS — especially after hearing from Rich Harris about Svelte on The Changelog #332. Max Stoiber writing on his personal blog with his take on the matter:

Primarily, CSS-in-JS boosts my confidence. I can add, change and delete CSS without any unexpected consequences. My changes to the styling of a component will not affect anything else. If I delete a component, I delete its CSS too. No more append-only stylesheets!


Discussion

Sign in or Join to comment or subscribe

2019-02-18T17:35:22Z ago

👋 Hey folks, author here. Let me know if you have any questions! (or if you would like to record a podcast episode 😜)

Jerod Santo

Jerod Santo

Bennington, Nebraska

Jerod co-hosts The Changelog, crashes JS Party & takes out the trash (his old code) once in awhile.

2019-02-18T17:48:37Z ago

Good stuff! The benefits of CSS-in-JS are compelling, indeed…

Off-topic, but: I’m curious about your webmention implementation on your site. Where is the code for this and where/how are you storing the fetched data? Asking for a friend… 😉

2019-02-18T18:11:42Z ago

The React components responsible for the fetching and rendering are in my website repo: https://github.com/mxstbr/mxstbr.com/tree/master/components/WebMentions

Then you have to use brid.gy and webmention.io to tie Twitter and Webmentions together and that’s it! Will write a post about that soon too, it’s a pretty cool setup 👍

Player art
  0:00 / 0:00