Fredrik Höglund أُعيد تغريده
Fredrik Höglund
2.1K posts

Fredrik Höglund
@ephemjs
Freelance developer - React Query maintainer - Occasional OSS contributor - Been putting React on servers for a decade - Father of two - Homebrewer
Stockholm انضم Aralık 2011
414 يتبع935 المتابعون

@cakemakerjake I realized my name was Ephem over there, so I updated it to my full name when I saw this to make me easier to find, so should be visible in search now. Thanks for pointing this out!
English

@ephemjs Strange, you didn't come up when searching for your name
English

@cakemakerjake Haha, it is not! 😂 This is me: bsky.app/profile/ephem.…
English


@jamannnnnn Good to hear and thanks for saying so, definitely helps motivation!
English
Fredrik Höglund أُعيد تغريده

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.

English

It's the @ReactAdvanced conf part of the week! Who am I seeing there tomorrow? 💂🏻♂️🎡🇬🇧
English

@phry @alvarlagerlof I'll get one at the airport for double the price then 😂
English


@alvarlagerlof @acemarke @ReactAdvanced I'm arriving Thursday afternoon, staying until Sunday, will be so great to meet both of you again!
English

Arrived in London for @ReactAdvanced this week!
Would love to hang out with folks here for the conf or anyone who's here already.
Ping me if you're around the next couple days, or will be at the conf and want to say hi!
English

@alvarlagerlof This makes me want to add this function. What it would do is populate the cache entry with "🐟🐠🐡" as a helpful means of finding that you've made an error.
Would also take longer than usual, because fishing is about waiting.
English
Fredrik Höglund أُعيد تغريده

@TkDodo I keep saying this could change library APIs in a huge way. 😀
English

@TkDodo Not only that, having "isomorphic" globals that are scoped per request on the server would also unlock moving a bunch of stuff off of context altogether. Imagine instead of having to do useQueryClient and pass that around, you could just import queryClient anywhere.
English

Can't even use state (or refs) for singletons anymore 😢
Fredrik Höglund@ephemjs
@pleunv @sophiebits @sebastienlorber @oljimenez Yeah. We had bug reports in React Query about doing: const [queryClient] = useState(() => new QueryClient()) when there was a Suspense boundary above that. If that boundary was hit, a new queryClient was created. Same with this promise thing: codesandbox.io/p/sandbox/naug…
English

@sebastienlorber @pleunv @sophiebits @oljimenez Yeah, I can't decide if your example up top can accidentally break, or if it is accidentally working. Glass half full half empty kind of situation I guess. 😆
English

@pleunv @sophiebits @sebastienlorber @oljimenez Oh yeah, it only becomes a problem when it becomes a problem, like when your app is suddenly suspending at a level it didn't before. There are unexpected cases like an error happening on the server and that top level Suspense boundary is now used to retry on the client.
English

@ephemjs @sophiebits @sebastienlorber @oljimenez This behavior seems normal, as a component triggering a grandparent suspense would also unmount any parents. I wouldn't expect the same without Suspense, though, and I think this is a fairly common pattern for global instance providers.
English

@pleunv @sophiebits @sebastienlorber @oljimenez Yeah. We had bug reports in React Query about doing:
const [queryClient] = useState(() => new QueryClient())
when there was a Suspense boundary above that. If that boundary was hit, a new queryClient was created.
Same with this promise thing: codesandbox.io/p/sandbox/naug…
English

@sophiebits @sebastienlorber @oljimenez Wait... so singleton patterns where instances are created in a state initializer in order to avoid a rather nasty useRef+useEffect approach are not safe? Is this a v19 thing?
English

@TkDodo @tan_stack My brain always hurts when we talk, but in a good way! I feel the information density is always super high.
English

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 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…), 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 🤩

English







