jordanbrennan.hashnode.devPass Astro server data to the clientThe Astro docs provide an example for passing server data to the client. That’s not quite as robust as what I wanted for my requirements, so here’s a slightly different approach: <!-- `account` is a variable defined in "front matter", i.e. Astro serv...Nov 18, 2025·1 min read
jordanbrennan.hashnode.devWhen Should I Use a Web Component?The biggest tech companies with the biggest websites are using Web Components and yet very few frontend engineers know how to build them and even fewer know when. I think it's because developers aren't sure where Web Components can fit in the crowded...Jun 15, 2024·13 min read
jordanbrennan.hashnode.devSo Many Native JavaScript Date FormatsI don't know about you, but I spend most of my time dreaming about the new Temporal API. It's going to make working with dates so much better in so many ways. But for now we have Date and Intl and together they actually offer a lot of date and time f...Apr 28, 2024·6 min read
jordanbrennan.hashnode.devCustom local domain solves CORS and other issuesProblem http://localhost:3000 can’t call your remote API because of browser-enforced limitations involving CORS, cookie sharing, and HTTPS. Solution Set up local.yourdomain.com on your dev machine so your browser will successfully call your remote se...Apr 15, 2024·3 min read
jordanbrennan.hashnode.devWeb Component Styles Are (mostly) Encapsulated Without Shadow DOMShadow DOM is often thought of as the one and only way to create scoped styles for a Web Component. It's not. Prefixed Tags Scope Styles Web Components, i.e. Custom Elements, require a prefixed tag. For example, a "foo" Custom Element would be define...Apr 8, 2024·2 min read