Fredrik Höglund

Fredrik Höglund

@ephem.dev

Clerk Core Team - React Query maintainer - Occasional OSS contributor - Been putting React on servers for a decade - Father of two - Homebrewer ephem.dev

408 followers249 following135 posts

London was amazing, so happy and grateful to meet friends both old and new.

Dominik 🔮@tkdodo.eu

Had the best time in London. With @normal-people.com, @tobbe.dev @ephem.dev and @farisaziz.com Photo by @etodanik.bsky.social

Heading to London! Who will I see at React Advanced on Friday? Busy schedule this week, so excited to meet so many friends again. Still got some time daytime Wednesday+Thursday if anyone wants to grab lunch/coffee, or think I should come work from your office.

Fredrik Höglund reposted

Replying to @react.dev

We found that the fix to address the DoS vulnerability in React Server Components (CVE-2025-55184) was incomplete and does not prevent an attack in a specific case. This is disclosed as CVE-2025-67779. New patches are available now, please update immediately.

Fredrik Höglund reposted

Researchers have found two new vulnerabilities in React Server Components while attempting to exploit the patches last week. These are new issues, separate from the critical CVE last week. The patch for React2Shell remains effective for the Remote Code Execution exploit.

Hoisting state is so often the answer, but many devs avoid it because they want co-location. Underrated solution: Export a hook alongside the component. Import and use the hook in a parent, pass the returned state down. Now parent owns the state and can interact with it, but logic is co-located.

I've seen so many creative solutions to avoid hoisting, like mutating refs, misusing useImperativeHandle, syncing state in effects etc, etc, often leading to hard to catch bugs. Just hoist it.

I finally found and fixed the unhandled promise rejection errors we've had in React Query for some time. If you are using prefetchQuery() without awaiting in Server Components, you'll want to upgrade to 5.90.3 to get rid of those pesky "An error occurred in the Server Components render" errors.

Fredrik Höglund reposted

👋 We're building a new type of word processor at Marker, and we're hiring for React/ProseMirror engineers and full-stack AI engineers to join the team in London. Are you an engineer who cares about writing? Or do you know someone who does? See: writewithmarker.com/jobs More details below 👇

Fredrik Höglund reposted

Replying to @rich-harris.dev

For the uninitiated, AsyncLocalStorage is a Node API (nodejs.org/api/async_co...) that's been adopted by other server runtimes. But we really need it in the browser too, and that's where github.com/tc39/proposa... comes in. Really hoping it moves forward, it will be huge

github.comGitHub - tc39/proposal-async-context: Async Context for JavaScriptAsync Context for JavaScript. Contribute to tc39/proposal-async-context development by creating an account on GitHub.

Writing docs today. I really enjoy doing so, but I have to constantly struggle against my nature of writing exhaustive long form wall of texts to make them actually useful. I need to get better at drawing charts and creating visual representations..

If you have two useQuery with different staleTime, would you expect isStale returned from that useQuery to: * Change individually as each staleTime passes? * Change together when shortest staleTime has passed? * Have access to both of the above as separate isGloballyStale/isLocallyStale?

View full thread

Actually, if a new component mounts with has a separate staleTime that is higher and has not passed yet, but an old visible component has a low staleTime that HAS passed, should the query refetch on mount? (Does today, but should it?)

If you have two useQuery with different staleTime, would you expect isStale returned from that useQuery to: * Change individually as each staleTime passes? * Change together when shortest staleTime has passed? * Have access to both of the above as separate isGloballyStale/isLocallyStale?

To be clear, this does not have to do with when the query refetches, the query would refetch and update both when the shortest staleTime had passed and options would dictate it (mount, window focus, network reconnect).

Fredrik Höglund reposted

📢 After more than 11 years of working at Adverity in various positions, I’ve decided to look for new challenges in 2025. 🚀 I'm excited to share that starting in January, I'll be joining the Frontend Platform Team at @sentry.io.

Building Next.js locally to test the latest React canary reminded me my Mac actually does have fans. Feels good to give it some exercise every once in a while.

Oh wow, rollup-plugin-preserve-directives is almost at 30k weekly downloads, it's probably time to make a stable release.. 🙄 I should probably add a pipeline and tests too, especially with all the new directives flying around, I just wish days had more hours.

Here's what's up! * Caring for kids, dog and house * Migrating a dashboard to app router and React Query.. * ..debugging some app router RQ bugs 😬 * Attempting general solution for making authenticated requests during suspense SSR - PoC working * Building a homebrewing fermentation temp controller

You are up to date.