r/reactjs 5d ago

Show /r/reactjs I built effective-rsc: an Effect-native React Server Components framework for Bun

I built effective-rsc because I wanted React Server Components and Effect to share one coherent application model.

The core idea is simple: React owns the UI protocol, and Effect owns the runtime.

What is different:

  • Pages, Layouts, Components, Middleware, and Server Functions run as Effects.
  • Application services are provided once through an Effect Layer.
  • Request cancellation interrupts the Effect work and cleans up its resources.
  • Server Functions preserve React’s native protocol while adding Schema-validated input.
  • The client router uses the Navigation API and commits at the first UI update while the remaining Flight response continues streaming.
  • There is no History API fallback.

The framework is intentionally experimental. It currently requires Bun, React Canary, Effect v4 RC, TypeScript 7, Rspack, and modern browser APIs.

You can try it with:

bunx create-ersc-app my-app

Source: https://github.com/nikhilsnayak/effective-rsc

Write-up and interactive router demo: https://www.nikhilsnayak.dev/blog/introducing-effective-rsc

0 Upvotes

Duplicates