Jim Simon's Avatar

Jim Simon

@jimsimon.dev.bsky.social

Staff Software Engineer (Web Platform) @ Reddit Also: Father of two boys • Loves hockey • Casual self-hoster • Nightly gamer Opinions and posts are my own and don't reflect the views of my employer.

326 Followers  |  159 Following  |  78 Posts  |  Joined: 04.09.2024  |  1.7888

Latest posts by jimsimon.dev on Bluesky

Small correction to a previous post. We don't use css-in-js. We use Lit's "styles" property.

20.03.2025 00:28 — 👍 4    🔁 0    💬 0    📌 0

It's definitely possible to get down to a single import. We just haven't focused on fixing it yet due to other priorities.

Also, this approach has the negative side effect of making our components heavy to use in isolation. We're okay with this trade-off since we never use a component on its own.

20.03.2025 00:26 — 👍 2    🔁 0    💬 1    📌 0

Yes. Our setup is a bit complex and we know there's some room for improvement. We have one stylesheet that we load for both the light DOM (<link>) and our shadow roots (css-in-js). Downside: we fetch CSS twice. Upside: the module system effectively dedupes the component version across all of them.

20.03.2025 00:20 — 👍 1    🔁 0    💬 1    📌 0

I really need to write an r/RedditEng blog post about it! I'm happy to answer any questions you may have though.

18.03.2025 00:43 — 👍 5    🔁 0    💬 0    📌 0

Our design system consists of both HTML template functions for server-side templates as well as Lit components for client-side usage. We'd like to move to using components entirely if Lit SSR works out for us. We use tailwind utility classes for CSS and disallow generally custom CSS.

18.03.2025 00:41 — 👍 8    🔁 0    💬 1    📌 0

Our backend uses a custom in-house built rendering engine that's very similar to Lit HTML (almost 100% API compatible). We're currently investigating moving to @lit-labs/ssr though.

17.03.2025 22:55 — 👍 5    🔁 0    💬 1    📌 0

1. We primarily use Lit, but we also have a handful of small, very simple components that are vanilla JS on top of the native browser APIs.

2. It's complicated 😂. Our architecture is server driven rendering using plain HTML as much as possible. We then layer in web components for richness.

17.03.2025 22:54 — 👍 9    🔁 0    💬 2    📌 0

Hello!

17.03.2025 22:12 — 👍 3    🔁 0    💬 1    📌 0

Nothing has so clearly shown how much the US is an "empire in decline" than what I just watched.

Time for the EU to fill the vacuum that the US is creating. Anything less means continental dominance by China & Russia.

The US was isolationist during WW1/2. We're repeating that historical mistake.

28.02.2025 22:31 — 👍 4    🔁 1    💬 0    📌 0

Must resist the urge to feed the troll(s)...

19.01.2025 16:28 — 👍 0    🔁 0    💬 0    📌 0

Haha, I'm considering it. I don't have a lot of free time these days though.

17.01.2025 03:26 — 👍 0    🔁 0    💬 2    📌 0

It feels like the Lit ecosystem is still missing a well maintained server framework. There used to be an Astro plugin, but support for it was dropped last year. Something in the same vein, with all the modern bells and whistles, would be a nice next step for the community.

17.01.2025 00:04 — 👍 2    🔁 0    💬 2    📌 0
Preview
Building Custom Elements With a Library The reason I use Lit instead of vanilla custom elements.

"I've been down that road before. I built my own library to author web components. Declarative templates, reactive data, lifecycle hooks — all the shiny things that make building components fun…I spent more time working on the library than the components."

www.abeautifulsite.net/posts/buildi...

16.01.2025 21:35 — 👍 18    🔁 4    💬 0    📌 0

Alright! This fix has rolled back out again as of last night! Both the double audio bug and low/incorrect thumbnail quality bug for Reddit videos should be fixed now. Thanks for following along!

10.01.2025 22:34 — 👍 2    🔁 1    💬 0    📌 0

Alright! This fix has rolled back out again as of last night! Both the double audio bug and low/incorrect thumbnail quality bug for Reddit videos should be fixed now. Thanks for following along!

10.01.2025 22:34 — 👍 2    🔁 1    💬 0    📌 0

This! And along a similar vein, you don't always (ever?) need a client-side router. I love pointing out to folks that Stack Overflow (a large site with heavy traffic) is completely server rendered and you generally don't notice because it's so damn fast. Also we have the View Transition API now!

21.12.2024 00:01 — 👍 2    🔁 0    💬 1    📌 0
Are Web Components A Thing Yet?

it exists! arewebcomponentsathingyet.com

10.12.2024 23:28 — 👍 13    🔁 1    💬 2    📌 0

I wonder if it would be impactful to list out more info, like which products are using web components and what library/framework they are using. Maybe how they're being used at each of these companies.

Example...

Company: Reddit
Product: reddit.com
Tools: Lit, Vanilla

10.12.2024 23:34 — 👍 2    🔁 0    💬 1    📌 0

You know what? I think I knew about this site and forgot it existed! Thanks for sharing!

10.12.2024 23:30 — 👍 0    🔁 0    💬 1    📌 0

For sure! A comprehensive list that anyone can add to, with a spotlight on the "big name brand" companies that use it would be a great marketing tool for the community.

10.12.2024 23:21 — 👍 1    🔁 0    💬 2    📌 0

We need a "Who's using web components" site to counter all of the "Nobody uses web components" folks. Something we can just link to everytime someone says it.

Big name companies off the top of my head: Adobe, Blizzard, Cisco, GitHub, Google, IBM, ING, Microsoft, Mozilla, Red Hat, Reddit, VMWare

10.12.2024 23:16 — 👍 16    🔁 2    💬 2    📌 1

We need a "Who's using web components" site to counter all of the "Nobody uses web components" folks. Something we can just link to everytime someone says it.

Big name companies off the top of my head: Adobe, Blizzard, Cisco, GitHub, Google, IBM, ING, Microsoft, Mozilla, Red Hat, Reddit, VMWare

10.12.2024 23:16 — 👍 16    🔁 2    💬 2    📌 1
Post image

Cool, Blizzards design system is custom elements built with @lit.dev

10.12.2024 21:42 — 👍 56    🔁 13    💬 2    📌 2
Preview
FBI Warns iPhone And Android Users—Stop Sending Texts U.S. officials urge citizens to use encrypted messaging and calls wherever they can—here’s what you need to know.

Friendly reminder that text messages are insecure and you should be using something with end-to-end encryption like Signal (the best option imo), WhatsApp, or Facebook Messenger instead!

ICYMI: www.forbes.com/sites/zakdof...

09.12.2024 13:59 — 👍 0    🔁 0    💬 0    📌 0

Then we can have a file that converts the single-letter variable names to more readable versions for debugging. A mapping file of some sort maybe?

07.12.2024 16:30 — 👍 2    🔁 0    💬 0    📌 0

Ah I missed the follow-up! Good stuff!

07.12.2024 16:27 — 👍 1    🔁 0    💬 0    📌 0

Everyone is different! Just gotta make sure the team's process works for everyone.

07.12.2024 16:15 — 👍 1    🔁 0    💬 0    📌 0

Yep! A lot of "Why are we paying 2 devs to deliver one part of a feature?", even after we shared data showing something like a 98% reduction in bugs during the dev process and after initial release. We also didn't run code coverage until a week before shipping and unintentionally had 92% coverage.

07.12.2024 16:14 — 👍 1    🔁 0    💬 0    📌 0

That team was also a team full of extroverts. That same process can be pretty draining for an introvert.

07.12.2024 16:10 — 👍 1    🔁 0    💬 1    📌 0

Same! We tend to do it on an as needed basis. That project I mentioned spent 90%+ of development time ping ponging. It's really hard to convince management to allow it though We did it as a trial and still had trouble convincing folks it was worth it, even after being super successful.

07.12.2024 16:08 — 👍 1    🔁 0    💬 2    📌 0

@jimsimon.dev is following 20 prominent accounts