Freelance developer - React Query maintainer - Occasional OSS contributor - Been putting React on servers for a decade - Father of two - Homebrewer

Stockholm
Fredrik Höglund retweeted
Gitlip Editors: Demo Launch 🌷 Gitlip is a collaborative coding platform, and today we’re launching the demo for Gitlip Editors - our take on collaborative coding environments. If you've ever wanted to collaborate on Markdown or code with the convenience of Google Docs, our demo is for you.
13
22
143
35,879
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.
1
8
733
Fredrik Höglund retweeted
Interested in how to host Infinite Git Repos on @Cloudflare? ⛅️ At Gitlip we’ve accomplished this using - Cloudflare Workers - Durable Objects - @libgit2 - @nixos_org - WebAssembly - @emscripten and now we’ve written about how we did it.
11
67
406
58,130
Fredrik Höglund retweeted
How did I not know these work in GitHub😍
75
585
6,077
451,642
Fredrik Höglund retweeted
Had the best of discussions with @tan_stack query co-maintainer @ephemjs today - one of those where your brain hurts after 2 hours 😂. Here are the things we went over: - A <QueryStrictMode> component that can detect if you've prefetched too much or too little. I'll post the RFC later today. - The `use` PR by @alexdotjs (github.com/TanStack/query/pu…), which we'll likely ship soon behind an experimental flag. Coincidentally, you will also be able to use that flag to trigger prefetches during render 🤯. - With the help of the nextJs and swr team, we think we found a way to make our experimental ReactQueryStreamedHydration plugin work with authenticated requests (@AdamRackis is gonna love this). It will likely need a re-write (new package), so don't expect anything too soon, but we think we could also make it independent of nextJs. Exciting 🤩
5
6
102
9,566
Fredrik Höglund retweeted
👨‍🍳 I just love it when @alexdotjs is cooking. Even better when he's doing it in the Query kitchen 🤩
3
2
60
17,163
Fredrik Höglund retweeted
I haven’t tweeted much for a while, but I think now is a good time to say what I’ve been working on. Until a few months ago I worked on AI Security at Indent, and since then Indent has joined OpenAI, but I’ve decided to do something else instead… For a while now I’ve wanted to build a product of my own and see how far I could push it - and I feel “now” is the perfect time to do it! I joined up with my good friend Zoran (@zplesiv) and we’re building a lightweight computing platform. The platform is going to feature: 1) git repositories, 2) collaborative coding, 3) 1-click deployments. We are steadily getting closer to our target initial feature-set and our first release! I won’t say much more publicly currently, but expect some very cool stuff from me soon 😌🌷✨
37
5
192
18,219
Fredrik Höglund retweeted
If you’re interested in learning about why we started investing into Turbopack in 2020 and why we’re gonna keep investing in it when other great bundlers like Vite and co have popped up in recent years, I’d suggest giving this great post from @timneutkens a read: github.com/vercel/next.js/is…
1
5
65
12,699
Fredrik Höglund retweeted
Replying to @0xca0a
It would be a bad outcome if the React community’s reaction to this saga is “haha, we bullied React into changing their position on lazy fetching”. You should still design APIs that encourage/support prefetching as the default.
4
2
26
3,891
Fredrik Höglund retweeted
Replying to @TkDodo
good news re Suspense, just met w/ @rickyfm @en_JS @acdlite * we care a lot about SPAs, team misjudged how many people rely on this today * still recommend preloading but recognize not always practical * we plan to hold the 19.0 release until we find a good fix more to come
20
98
730
299,233
I hope this didn't come off as a dunk on @isographlabs vision, I think that's great! What I'm trying to say (and possibly failing at) is yes, that's great, and also existing libraries can do more.
1
148
Prefetching only at the very top is terrible, but I think component co-location is also overrated. Prefetching for subtrees is a sweetspot, at least for me.
2
1
163
To be clear, I'm not saying we shouldn't invest in automatic hoisting, just that we should also do more to make manual prefetching more ergonomic. RSCs and frameworks with nested loaders do this by making it possible to prefetch closer to where data is used.
1
1
47
The "dual tree" problem of React has been around from the start, how do you know what to render, before you render? For years I was thinking about ways to "fix" this, now I've come to embrace it instead.
1
1
34
Prefetching stuff that didn't end up getting used? Libraries should warn/surface this in devtools. Not prefetching stuff? Same thing. There is a ton of things we could do to make this easier, but we haven't.
2
3
44
I agree with a lot of this, and I also used to think the long term solution would not involve manual hoisting, but I'm not so sure anymore. I think we've invested too much in trying to remove manual prefetching, and too little in building good DX and tooling supporting it.
Replying to @StatisticsFTW
"Manually hoisting" is the solution that everyone has in their heads, and the reaction is — that's hard! And that's correct. The long term solution will not involve manually hoisting. Manually hoisting is a nightmare at scale (at least without linear types, lol) — there's nothing guaranteeing that every resource you load is actually used by the subcomponents in your tree. So you will end up loading more resources than necessary, especially in complicated UIs. This isn't just a problem when when manually writing route loaders. It is also a problem when writing REST endpoints — they bloat over time for the same reason. And it's also a problem when you call useQuery once at the root of a given component tree (which one must do for perf) — over time, that useQuery call will fetch more data than that tree needs, because it's easy to add fields but dangerous to remove them. (Who wants to risk breaking production so that a useQuery call uses 0.1% less bandwidth?)
1
1
5
728
Fredrik Höglund retweeted
Big news! I'm joining Clerk (for 3 months) as an OSS Fellow to work full-time on Zod's next major version. Mad props to @clerk for being willing to experiment with new OSS funding models like this 🤠 Thanks @tweetsbycolin! zod.dev/blog/clerk-fellowshi…
35
24
662
69,680
Fredrik Höglund retweeted
We just published a new version of the `@apollo/experimental-nextjs-app-support` and `@apollo/client-react-streaming packages`. Version 0.11.0 comes with a lot of updates: - Prefetching queries for Client Components in RSC - Renamed exports - Next.js 15 support - Less transported data - @apollo/client-react-streaming/stream-utils
5
14
40
5,947
Fredrik Höglund retweeted
📢 I'm so stoked to announce that today, 🔮 query.gg - the brand new, official @tan_stack React Query course - is live and available for everyone 🎉
43
86
743
130,029