I’ve often seen ‘generic’ services become rife with business logic and tightly coupled to their consumers. This seems even more common in the age of AI: ‘just one more conditional, bro.’ Some thoughts: www.jayfreestone.com/writing/the-...
Jay Freestone
Jay Freestone
@jayfreestone.com
A product engineer living & working in East London. jayfreestone.com
69 followers220 following48 posts
Dead-simple `Error.cause` wrapping library to bring `as` and `is` to TypeScript: www.jayfreestone.com/links/causew...
Jay Freestone reposted
Working on my wife's portfolio website and solved a design problem by using CSS round(). This is a less used yet very useful function! Here is my article about it, and will update it soon with a new use case: ishadeed.com/article/css-...
100% agree - we're way too quick to just throw more compute at problems: yusufaytas.com/old-software...
Jay Freestone reposted
100% agree. if i see “chore” in commit log, im judging you
Jay Freestone reposted
Why not embrace the HATEOAS ethos and send down permissions, policies and actionable states from the API to the client, rather than duplicating or sharing code? www.jayfreestone.com/writing/shar...
If you're not sticking with traditional OOP and don't have a clear domain model, you might not need the repository pattern. Most of the JS/TS examples I've seen in the wild start out well-intentioned, but devolve into a mess: www.jayfreestone.com/writing/you-...
Jay Freestone reposted
Late to the party, but I just discovered the 'blocking=render' script attribute. Used judiciously, it’s perfect for hiding components that depend on client-side JavaScript to render properly. Firefox is the only holdout, so support is already pretty good. www.jayfreestone.com/writing/inte...
The git integration in JetBrains IDEs really is unrivalled, so I'm excited to see Rebased gain some traction: github.com/DetachHead/r...
Jay Freestone reposted
Jay Freestone reposted
🔥 I've been debugging @nodejs.org performance for over a decade. The hardest part? Making sense of thousands of stack frames in a flamegraph. What if your AI assistant could do that for you? Today, we're releasing a new feature in `@platformatic/flame`. 🧵
Jay Freestone reposted
🆕 npx unbarrelify At last, an easy way get rid of barrel files! Rewrites consumers to import directly from source, then deletes the barrels. Safe and fully automated, read all about it at github.com/webpro/unbar...
Jay Freestone reposted
:nth-child() was upgraded (a long time ago, but no one seems to know about it) youtube.com/shorts/rep-C...
Jay Freestone reposted
Jay Freestone reposted
Since people seem to interested in alternative Server Component architectures, might as well publish the source. These documents are rough, basically brain dumps. But I think thanks to Tanstack there is interest. "Isomorphic First Framework" hackmd.io/@0u1u3zEAQAO...
Missed that this was even coming, very neat! react.dev/reference/re... Solves a longstanding pain point with `useEffect`.
Jay Freestone reposted
TIL: the "sync" in @react.dev's useSyncExternalStore isn't for "synchronise", it's for "synchronous". As: it's not for synchronising against an external store, It's for synchronously (ie: disabling concurrent features) updating against a store's changes. h/t @tkdodo.eu 🤯
Jay Freestone reposted
🚀 Good news, everyone: GraphQL now supports OneOf input objects (aka input unions)! This long-requested feature is a small change that packs a big return for developers, making schemas more expressive and APIs easier to use. Read all about it 👉 graphql.org/blog/2025-0...
Zod’s new Codecs feature looks pretty neat - easy bidirectional transformations: colinhacks.com/essays/intro...
Jay Freestone reposted
If you ever wanted to use `sizes=auto` and were bummed out about Safari/Firefox support, Shopify now got a polyfill for ya! github.com/Shopify/auto...
Jay Freestone reposted
@danabra.mov just dropped a blog post in the comments where he points out why RSCs effectively solve the problems a number of disparate technologies were created to solve (but can fall short). High quality content.
Jay Freestone reposted
This is delightful. I was totally expecting it to not work on mobile, but it does! thirty-five.com/overengineer...
If you’re using React Hook Form, the new lenses addon makes it miles easier to create strongly typed reusable fields: github.com/react-hook-f... Got rid of so many generics with this, and everything is still typed properly.
Funny considering that Go has the least expressive type system known to man, but this is amazing and unexpected news: devblogs.microsoft.com/typescript/t...
Jay Freestone reposted
“Introducing command and commandfor” by @keithamus.social This is one of the most exciting additions to the web platform in a while, in my opinion. Opens many opportunities from the get-go, but also opens many good opportunities in the future. developer.chrome.com/blog/command... #html #js #web
Jay Freestone reposted
This new library does seem interesting. A more powerful, easily chainable kind of class mixins...? www.reddit.com/r/typescript...
Jay Freestone reposted
I heard react-router v7 has middleware 👀 github.com/forge-42/bas...
This is a great tip to avoid having to set ‘as const’ on a thousand separate string inputs in TypeScript: pawelgrzybek.com/infer-type-o...
Didn’t know this: > For React refresh to work correctly, your file should only export React components. github.com/vitejs/vite-... There’s an ESLint rule and everything: github.com/ArnaudBarre/...
Jay Freestone reposted
Great post today from a former NYT dev who traced the history of the widespread `useIsomorphicLayoutEffect` snippet back through multiple libs... and identified "a React-Redux maintainer" as the main source that everyone copied. Uh. Hi. Yes. That'd be me :) smoores.dev/post/no_such...
Jay Freestone reposted
💡 CSS Tip! Save this one line of code for the future! css-tip.com/center-upper... No more hacky code trying to remove those spaces above and below an uppercase text. You can easily have a perfect centering for the text! #CSS
Jay Freestone reposted
📢 We're finally looking to ship Observables in Chrome!! It's been a long time coming—many thanks to all in the community for the great feedback and help along the way!! Especially @benlesh.bsky.social, @keithamus.social, @domenic.me, @jordan.har.band & more! 🙏 groups.google.com/a/chromium.o...
Jay Freestone reposted
Got this neat suggestion during the Vitest workshop this week. Wen can technically use `expect.fail` in "onUnhandledRequest" to make MSW actually fail the tests where unhandled requests happen. This isn't something I recommend as of now but an interesting idea.
Jay Freestone reposted
Jay Freestone reposted
I’ve avoided `text-align: justify` for years. Do modern #CSS properties unlock its potential? cloudfour.com/thinks/justi... #Typography #WebDesign #WebDev
Late to the party but this was a fascinating listen: podcasts.apple.com/gb/podcast/8... Wild to think that at this scale it was cheaper to just rewrite Webpack in Rust.
Jay Freestone reposted
Didn’t realise you could embed 1Password app URLs in env files and load values via the CLI 👀: nshipster.com/1password-cli/
Jay Freestone reposted
Node.js now supports TypeScript. Here's everything you need to know: www.totaltypescript.com/typescript-i...
Neat seeing subpath imports used in the wild: storybook.js.org/blog/compone...
It's kind of wild that the default GraphQL client codegen setup (client-preset) generates a massive mapping of operations which gets shipped wherever you ship your client: the-guild.dev/graphql/code... Provided solutions are buggy, slow or both. Lots of issues like this: github.com/dotansimha/g...