frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Performance-focused forks of styled-components

https://www.sanity.io/blog/cut-styled-components-into-pieces-this-is-our-last-resort
28•isaiahwp•2h ago

Comments

RedShift1•1h ago
Maybe CSS in JS was the wrong thing to begin with. Your developers were so preoccupied with whether they could, they didn't stop to think if they should.
mootoday•1h ago
I came to post the same comment :-)!
jeswin•1h ago
It might seem like a terrible idea now. But when it was first introduced, a) people were still trying to get CSS and Components to work together, React having made components quite popular; and (b) React was actually usable, compared to the complete mess it's become now, especially after they introduced hooks.

I switched to web components for all my personal work.

a_humean•1h ago
But we already had things like tachyons css (tailwind precursor) and webpack css modules at the time that both offered static stylesheet solutions to that problem.
jeswin•22m ago
They weren't great either in hindsight.

But more importantly, we need to explore different paths to figure out what doesn't work. Things which seem like bad ideas in hindsight aren't bad experiments to run - otherwise we will all learn nothing.

breakingcups•1h ago
I was about to say the same. Having lived mostly in Vue land, this quote felt astounding to me:

"The React team themselves have made it clear: runtime CSS injection will always be slower than statically extracted styles. They recommend using <link rel="stylesheet"> for static styles and inline styles for dynamic values. That's the future."

I thought this lesson was already widely learned since the jQuery days.

Perz1val•1h ago
"React Andies" have not seen jquery days
reify•1h ago
Does this mean I can eat 40% faster when I use a fork.

if so, I shall set the dining table without knives.

there is no spoon!

dalf•1h ago
You might not have a fork if you dine with philosophers

( https://en.wikipedia.org/wiki/Dining_philosophers_problem )

tym0•1h ago
Haven't written frontend in a few years but honestly for me CSS Modules solved the scoping issue and all the CSS in JS/Tailwind stuff since then feels like a red herring.
theknarf•1h ago
I've always thought CSS Modules was the best solution as well, having worked a lot with Tailwind its entirely okay, but "CSS in JS" was always a bad idea from the get go.
coxmi•1h ago
I’d go further than this and say globally-scoped CSS is fine as long as you’re using a decent naming pattern (e.g. BEM), or @layers.

For me, back in the JQuery days, the problem was always globally-scoped JS/DOM, rather than CSS. The big revolution was simply co-locating/importing styles in JS modules during the compile step, which works surprisingly well even outside of any framework.

Just using vanilla DOM or a small wrapper around web components for connectedCallback/disconnectedCallback logic is refreshingly simple. It’s quite sad that most SSR frameworks don’t allow this sort of approach, and lock you in to a specific front-end library.

joduplessis•1h ago
CSS-in-JS is possibly the worst idea to come out of the last 10 years of frontend. Saying that as someone who has written a lot of CSS-in-JS code.
lloydatkinson•1h ago
I normally refrain from commenting on anything regarding CSS, styling, and design systems as I feel that HN in particular has disingenuous debates on it.

Rather than using a fork, you could completely remove the “style sheets at runtime” part by using a CSS in TypeScript tool which builds everything and produces plain CSS files and CSS variables.

There are at least four main benefit:

- Can enforce design tokens (colours, spacing, whatever) with type safety

- The previous point helps enforce and encourage design consistency; I have lost count of the amount of times I’ve seen lazy “just append some more unmaintainable mess” at the bottom of CSS files

- CSS is built at build time which is what you are already familiar with if you’ve used a CSS preprocessor before

- Smaller file sizes sent to the users browser

Oh and one final thing: vanilla-extract is not just for React, its standalone meaning you can use it even with something entirely server side if you wished.

pimterry•1h ago
Personally I've started migrating to vanilla-extract (https://vanilla-extract.style/): syntactically & conceptually similar to SC, relatively easy migration and lots of the same advantages, but entirely precompiled with zero runtime and nicely framework & tooling agnostic.
jorams•1h ago
Sounds like a good development, but some statements in the post are a bit odd to me:

> Your app has styled-components. That's not changing today. But it doesn't have to be slow while you figure out tomorrow.

It always was. You decided to make it slow and were fine with it, not sure why that's suddenly unacceptable.

Indian Point owner floats restart of shuttered nuclear reactors

https://www.politico.com/news/2025/09/10/indian-point-owner-floats-restart-of-shuttered-nuclear-r...
1•mpweiher•48s ago•0 comments

Gospelart

https://puabgb-ip-169-239-159-12.tunnelmole.net
1•idiblaise•1m ago•0 comments

Freshdesk Integration with Jira. Step-by-Step Guide

https://www.getint.io/blog/freshdesk-integration-with-jira
1•renata_getint•1m ago•0 comments

When the job search becomes impossible: three phases of burnout

https://www.jeffwofford.com/wp/?p=2240
1•putzdown•2m ago•0 comments

Ask HN: Why is enrolling in Apple's Developer Program so difficult in 2025?

1•thomas_witt•10m ago•0 comments

Show HN: Valkyrie – A community-powered security scanner for your CI/CD

https://github.com/AllDotPy/Valkyrie
1•Einswilli•11m ago•0 comments

Quantum computing company raises a record $1B

https://www.ft.com/content/0a16281f-6bb4-4e60-a6f0-3a9d6f8d764a
1•EvgeniyZh•13m ago•0 comments

Auwalsani

https://blog.cloudflare.com/cloudflare-sse-gartner-magic-quadrant-2025/
1•Maidanragi•17m ago•0 comments

Go Podcast

https://www.youtube.com/channel/UC2MDU-j8SJUjDKcwmUNrn8A
1•gethly•18m ago•0 comments

U.S. Senators call on ICE to halt use of facial recognition

https://www.markey.senate.gov/news/press-releases/markey-wyden-and-merkley-demand-ice-stop-using-...
2•Improvement•20m ago•0 comments

Simple Licensing

https://rslstandard.org/
1•Bogdanp•24m ago•0 comments

We engineered RAG to be 50% faster

https://elevenlabs.io/blog/engineering-rag
1•lharries•26m ago•0 comments

All examples from The LaTeX Companion book (3rd edition)

https://ctan.org/pkg/tlc3-examples
2•teleforce•27m ago•0 comments

Setting up rooted Android emulator with Frida and mitmproxy

https://www.trickster.dev/post/setting-up-rooted-android-emulator-with-frida-and-mitmproxy/
1•rl1987•30m ago•0 comments

ASK HN: Would you want to join a computer science newsletter?

1•bilalcg•31m ago•0 comments

What 30k Free Users Taught Me About Charging $10/Month

9•evermike•35m ago•6 comments

Show HN: I made a generative online drum machine with ClojureScript

https://dopeloop.ai/beat-maker/
1•chr15m•35m ago•0 comments

Elizabeth I and the 'Blackamoors': the deportation that never was

https://www.mirandakaufmann.com/blog/elizabeth-i-and-the-blackamoors-the-deportation-that-never-was
1•fanf2•38m ago•0 comments

Scientists pioneer 'animal internet': dog phones and touch screens for parrots

https://www.ft.com/content/10dc5add-ed1c-4640-8ec4-25c6b41eed09
1•stareatgoats•40m ago•1 comments

XAI exposed: Grok admits "humans ordered delays" – FTC Case 191913595

https://www.quora.com/profile/Vic-LU-16/Title-%E6%A8%99%E9%A1%8C-xAI-exposed-Grok-admits-humans-o...
1•VIC513•44m ago•2 comments

iPhones 17 and the Sugar Water Trap

https://stratechery.com/2025/iphones-17-and-the-sugar-water-trap/
1•tosh•45m ago•0 comments

Android Platform-Tools 36.0.0 Released – Not yet Open‑Sourced

https://github.com/nmeum/android-tools/issues/185
5•uneven9434•47m ago•0 comments

Google admits the open web is in 'rapid decline'

https://www.theverge.com/news/773928/google-open-web-rapid-decline
4•sMarsIntruder•50m ago•1 comments

A framework for pricing AI products

https://stripe.com/blog/a-framework-for-pricing-ai-products
1•soheilpro•52m ago•0 comments

Is Go Over? [audio]

https://gopodcast.dev/episodes/059-is-go-over-with-john-arundel
1•gus_leonel•56m ago•0 comments

Visualgpt

https://visualgpt.io/
1•Jennifer_z•58m ago•1 comments

Nintendo's latest patents on Pokémon mechanics should not have been granted

https://www.pcgamer.com/gaming-industry/an-embarrassing-failure-of-the-us-patent-system-videogame...
4•chabad360•1h ago•0 comments

Decompiling the GPL violated Linux kernel using Evolutionary Algorithms

https://far.chickenkiller.com/computing/decompiling-the-kernel-using-ea/
3•farooqkz•1h ago•0 comments

Google is shutting down Tables, its Airtable rival

https://techcrunch.com/2025/09/11/google-is-shutting-down-tables-its-airtable-rival/
2•jmsflknr•1h ago•0 comments

I built a free Chrome extension to summarize anything with 17 AI models

1•huizhu•1h ago•0 comments