Ryan Toronto @ryantoron.to · 22/01/2026Yes 100% Do you have any recommendations for tooling? I noticed I'm getting way more strict about linting rules and even toying with bringing in some cyclomatic complexity and test coverage measures, but these feel like half baked solutions that are brittle (and annoying to others) 010
Ryan Toronto @ryantoron.to · 14/12/2025that router refresh demo is so good... especially when viewing the code and payload side-by-side. just perfect for walking through how the server can refresh without losing client state. 030
Ryan Toronto @ryantoron.to · 14/12/2025i think you want a protocol from client->server so you can pass rich objects like promises, maps/sets, tmp references etc from c to s. fwiw under the hood rsc will use json when going from client->server if there are no rich objects, otherwise it uses FormData as a container for the flight payload 140
Ryan Toronto @ryantoron.to · 23/09/2025I added parallel and recursive route rendering to Twofold, which kind of blew my mind. It's the first time I've used a React pattern that specifically takes advantage of the two phase server/client render. Wrote about it here: twofoldframework.com/blog/paralle...twofoldframework.comParallel and recursive route renderingRSC route rendering without waterfalls. 0112
Ryan Toronto @ryantoron.to · 11/08/2025thanks tom! i really need to give convex try, it looks awesome 120
Ryan Toronto @ryantoron.to · 11/08/2025thanks! i ran into a nasty bug a few weeks ago when our dashboard was displaying a bunch of "incorrect" information because queries were firing at different times 010
Ryan Toronto @ryantoron.to · 11/08/2025This post explores how components that read impure data can end up with inconsistent trees, and how React's cache function easily fixes that for you. 060
Ryan Toronto @ryantoron.to · 11/08/2025React Cache: It's about consistency twofoldframework.com/blog/react-c...twofoldframework.comReact Cache: It's about consistencyLearn how React's cache function keeps your components predictable and consistent. 3212
Ryan Toronto @ryantoron.to · 03/07/2025it's awesome. my favorite piece about it is how it flattens all async calls and gives you the mental model of sync execution. uAS+async will always run in order, and each call gets access to previous state even if it was called before the previous call finished 🤯 020
Ryan Toronto @ryantoron.to · 25/06/2025Process wise I write way more jsdoc comments now. I treat those as future proofing and guarding against any agent that comes into the code base. Also I'm finding tests to be way more valuable these days. I look at tests as a cheap insurance option now. 020
Ryan Toronto @ryantoron.to · 25/06/2025I find it helpful it on the edges for non-app code. Like "make me a persistent hash map" that I can then tweak/play with. Also it's amazing for autocompleting the current line. But I'm not a fan of huge chunks of app code written with AI. I believe that requires taste that the agent doesn't have. 240
Ryan Toronto @ryantoron.to · 25/06/2025This switches to the react-server export condition for this import? I like it! 000
Ryan Toronto @ryantoron.to · 18/06/2025This can be hard to wrap your head around the first time you see RSC. I think it deserves a follow up post! 000
Ryan Toronto @ryantoron.to · 18/06/2025This is a great question. If you have <Intersection><RSC></Intersection>, the RSC will run on the server before <Intersection> runs on the client. So you end up with <Intersection>Output from RSC</intersection>. You can wrap in Suspense to not block rendering, but it doesnt prevent RSC from running 110
Ryan Toronto @ryantoron.to · 17/06/2025Sounds interesting... Do you have an example UI in mind for that sort of use case? 100
Ryan Toronto @ryantoron.to · 17/06/2025New blog post: Composable streaming with Suspense One of my favorite patterns lately has been using Suspense to stream in lazily loaded content. It's perfect for dynamic dropdown menu options. twofoldframework.com/blog/composa...twofoldframework.comComposable streaming with SuspenseA look at two real-world UIs that rely on streaming with Suspense. 1517
Ryan Toronto @ryantoron.to · 12/06/2025Great great article, thanks for sharing I know it's a bit boilerplatey, but personally I've found the setState during render (increase/decrease example from docs) to work well with derived useStates based on changing props 010
Ryan Toronto @ryantoron.to · 09/06/2025Really enjoyed this one. Great post and the video walk through is fantastic as well. 010
Ryan Toronto @ryantoron.to · 22/05/2025They are the worst :( Also the AIs that start commenting on issues and other people's pull requests 010
Reposted by Ryan TorontoBrooks Lybrand @brookslybrand.bsky.social · 16/05/2025React Router RSC Preview is now available This brings support for all of React's API in a way that is incrementally adoptable by the millions of React Router apps in production today, but also feels great for a greenfield React Router app remix.run/blog/rsc-pre...remix.runReact Router RSC PreviewReact Router's preview support for React Server Components is now available 37110
Ryan Toronto @ryantoron.to · 18/05/2025I'm willing to bet in most my RSC apps I'm passing larger objects than needed between server and client, but it hasn't really been a problem so far. Agree with Jacob that it's about education. My 2c is devs need to understand .bind and serialization to do RSC well 020
Ryan Toronto @ryantoron.to · 17/05/2025I made this to help with hoisting and encryption for inline server functions github.com/twofold-rsc/... Lemme know if you have any interest in something like that for Parcel 120
Reposted by Ryan TorontoDaniel Saewitz @saewitz.com · 30/04/2025Server Components Give You Optionality saewitz.com/server-compo...saewitz.comServer Components Give You Optionality | Daniel Saewitz 1211
Ryan Toronto @ryantoron.to · 28/04/2025It's so elegant, been using it for the last few weeks and I love it. Might be my favorite example of a directive because: - Automatic cache keys - Function hoisting similar to server functions (you can close over variables) - Opaque references (passing children doesnt create a new entry) 150
Ryan Toronto @ryantoron.to · 25/04/2025New blog post on serializing promises in React. Learn how RSC serializes data between the server and client. twofoldframework.com/blog/you-can...twofoldframework.comYou can serialize a promise in ReactUse React to create a promise on the server and later finish it on the client. 2667
Ryan Toronto @ryantoron.to · 22/04/2025Great post. The squiggly line that splits the server and client components is an awesome UI and makes the code easy to read. Is that new? 170
Ryan Toronto @ryantoron.to · 21/04/2025Upstanding, trustworthy (the opposite of click bait, gossip) I look forward to your newsletter every week, it's the best way to see what's happening in the React ecosystem 131
Ryan Toronto @ryantoron.to · 17/04/2025If you're running an RSC server how do handle the react-server condition? 1. start node with --conditions=react-server? 2. run node without conditions, but start a worker with the react-server condition? 3. Something else, like a bundle time thing? I've been doing 1, but I'm not sure it's best 010
Ryan Toronto @ryantoron.to · 11/04/2025I wrote about building toast messages into an app with React Server Components. Really liked how easy it was to use server functions, cookies, and useOptimistic to make this all come together. buildui.com/posts/toast-...buildui.comToast messages in React Server Components 181
Ryan Toronto @ryantoron.to · 11/04/2025this is fantastic. we've got a requirement in an app at work where we need to load all the images before rendering the next page. having all that done by react (and tied to a transition) is gonna be awesome 110
Ryan Toronto @ryantoron.to · 22/03/2025RSC with a form and server action running while JavaScript is turned off 160
Ryan Toronto @ryantoron.to · 19/03/2025Hey @sebmarkbage.calyptus.eu I have an RSC+MPA question... is there a way to have a <form> that uses a server action directly (so you get $ACTION_ID/REF inputs for MPA), but then after hydration is able to work with client-side code that uses useOptimistic? 010
Ryan Toronto @ryantoron.to · 15/12/2024Completed this! Ended up releasing it as an open source library: github.com/twofold-rsc/... My first RSC OSS tool, feels good :) 060
Ryan Toronto @ryantoron.to · 07/12/2024RSC stream feels like it has so many use cases out outside of component rendering... it's like json on steroids. 020
Ryan Toronto @ryantoron.to · 07/12/2024Next.js source is a work of art. I was wondering how they serialize and encrypt action args and found this: github.com/vercel/next.... Of course they use an rsc stream to serialize all the args into a string... and then encrypt! 150
Ryan Toronto @ryantoron.to · 02/12/2024Nice, thanks. Additional transition is what allows the setState to get entangled/batched into the wrapping transition from the component? Re-apply action context is nice wording. 110
Ryan Toronto @ryantoron.to · 02/12/2024Very cool, thank you. This helps and I love reading these threads. If I'm making a component and I expose `saveAction={() => {...}`, is it fair say that it means: 1) Whatever callback you pass in here will be run inside of a transition 2) It can be sync or async Any other rules I should follow? 240
Ryan Toronto @ryantoron.to · 01/12/2024Made some progress on this! Here's my test suite so far: github.com/twofold-rsc/... This is a little verbose, but I'm pretty proud of this attached test. It turns captured variables into function params. 030
Ryan Toronto @ryantoron.to · 28/11/2024This weekend I'm going to try implementing this. A plugin that turns a function defined in render into one that automatically encrypts/decrypts anything it closes over. 120
Ryan Toronto @ryantoron.to · 28/11/2024If you encrypt (or sign) those closed over variables before giving them to the client, then by the time they make it back to the server you know you can trust them. The server can skip auth/validation because if params decrypt they are 100% valid. It's like CSRF for every single hidden form input. 100
Ryan Toronto @ryantoron.to · 28/11/2024One of the areas where I've changed my mind recently is with server actions + closures. In the past I believed it was too dangerous to close over variables during render because it creates an implicit client param and therefore devs would be better off being explicit with hidden form inputs. but... 140
Ryan Toronto @ryantoron.to · 25/11/2024I've been thinking about this question a bit more over the weekend, it's a great one. Is the main point of the question to highlight the unique thing about RSC is that it lets you decide where code runs? 110