Jim Simon
banner
jimsimon.dev
Jim Simon
@jimsimon.dev
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.
Pinned
I realized I never shared the blog post I wrote for the Reddit Engineering Blog about how we adopted Vite in our monorepo. Seems like a solid first post for this platform! Check it out here: www.reddit.com/r/RedditEng/...
www.reddit.com
Small correction to a previous post. We don't use css-in-js. We use Lit's "styles" property.
March 20, 2025 at 12:28 AM
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.
March 20, 2025 at 12:26 AM
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.
March 20, 2025 at 12:20 AM
I really need to write an r/RedditEng blog post about it! I'm happy to answer any questions you may have though.
March 18, 2025 at 12:42 AM
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.
March 18, 2025 at 12:41 AM
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.
March 17, 2025 at 10:55 PM
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.
March 17, 2025 at 10:54 PM
Hello!
March 17, 2025 at 10:12 PM
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.
February 28, 2025 at 10:31 PM
Must resist the urge to feed the troll(s)...
January 19, 2025 at 4:28 PM
Haha, I'm considering it. I don't have a lot of free time these days though.
January 17, 2025 at 3:26 AM
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.
January 17, 2025 at 12:04 AM
Reposted by Jim Simon
"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...
Building Custom Elements With a Library
The reason I use Lit instead of vanilla custom elements.
www.abeautifulsite.net
January 16, 2025 at 9:35 PM
Reposted by Jim Simon
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!
January 10, 2025 at 10:35 PM
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!
January 10, 2025 at 10:35 PM
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!
December 21, 2024 at 12:01 AM
Reposted by Jim Simon
Are Web Components A Thing Yet?
arewebcomponentsathingyet.com
December 10, 2024 at 11:28 PM
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
December 10, 2024 at 11:34 PM
You know what? I think I knew about this site and forgot it existed! Thanks for sharing!
December 10, 2024 at 11:30 PM
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.
December 10, 2024 at 11:21 PM
Reposted by Jim Simon
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
December 10, 2024 at 11:16 PM
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
December 10, 2024 at 11:16 PM
Reposted by Jim Simon
Cool, Blizzards design system is custom elements built with @lit.dev
December 10, 2024 at 9:42 PM
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...
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.
www.forbes.com
December 9, 2024 at 1:59 PM
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?
December 7, 2024 at 4:30 PM