cornflour

joined 1 year ago
[โ€“] [email protected] 1 points 1 year ago

I have been enjoying it! I think the RSC data fetching pattern is really nice, and it simplifies the logic of the app. It's also really nice to have the same pattern for non blocking fetching (use suspense to show loading states), blocking fetching with ssr (no suspense), ssg (cache the fetch indefinitely/fetch on build), or isr (cache with revalidation time), and to be able to granually config the behaviors on the individual fetch level.

There still some rough parts, most notably imo is the caching/revalidating side of things. Maybe I didn't do it right, but I was struggling hard ro invalidate caches to show updated data after mutation ๐Ÿฅฒ I currently just set all the fetches to no cache right now, and for now it is fine (i dont have so much traffic on that project that it causes an issue, just me and some of my friends testing things rn). Imo caching should be an opt in thing for optimization rather than a default, but I think thats more of the Next's specific implementation rather than rsc in general.

[โ€“] [email protected] 3 points 1 year ago (2 children)

I use it a lot when I use RSC! For traditional client-side fetching, I tried it with tanstack query but couldn't get it to work properly (could be me setting it up wrong or because tanstack query's suspense support is still experimental, idk), so I just fall back to doing it traditionally with isLoading and stuff ๐Ÿ˜…

[โ€“] [email protected] 2 points 1 year ago (1 children)

This is really cool! Would it be possible to grab this data as json, csv or some other equivalent format? I'm working on making my own lemmy client and this would be very helpful to be able to display i think