top | item 46240113 (no title) codemonkey-zeta | 2 months ago Can you describe how rsc allows you to avoid rest endpoints? Are you just putting your rsc server directly on top of your database? discuss order hn newest berekuk|2 months ago If I control both the backend and the frontend, yes. Server-only async components on top of layout/page component hierarchy, components -> DTO layer -> Prisma. Similar to this: https://nextjs.org/blog/security-nextjs-server-components-ac...You still need API routes for stuff like data-heavy async dropdowns, or anything else that's hard to express as a pure URL -> HTML, but it cuts down the number of routes you need by 90% or more. skydhash|2 months ago You’re just shifting the problem from HTTP to an adhoc protocol on top of it. load replies (1)
berekuk|2 months ago If I control both the backend and the frontend, yes. Server-only async components on top of layout/page component hierarchy, components -> DTO layer -> Prisma. Similar to this: https://nextjs.org/blog/security-nextjs-server-components-ac...You still need API routes for stuff like data-heavy async dropdowns, or anything else that's hard to express as a pure URL -> HTML, but it cuts down the number of routes you need by 90% or more. skydhash|2 months ago You’re just shifting the problem from HTTP to an adhoc protocol on top of it. load replies (1)
skydhash|2 months ago You’re just shifting the problem from HTTP to an adhoc protocol on top of it. load replies (1)
berekuk|2 months ago
You still need API routes for stuff like data-heavy async dropdowns, or anything else that's hard to express as a pure URL -> HTML, but it cuts down the number of routes you need by 90% or more.
skydhash|2 months ago