Skip to content

krasimir/forket

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

𐂐 Forket - the RSC support without a framework

Forket is a tool that splits your code to client and server so you have RSC (React Server Components) working without a framework.

RSC features

Feature Is supported
Streaming
Async server components
Mixing server and client components
"use client" and "use server" directives
Suspense + use
Server functions
Server actions
useActionState, useTransition
Passing live-promise from server to client

‎ ## Examples/Templates

Caveats

I'm quite happy with the result so far. The libarry is supporting almost everything that is listed into the official docs. However, to make all this work at a decent level I had to make some compromises. Here's the list:

  • You can’t have nester client boundaries or in other words nested islands.
  • There is an additional div with display: content for the root client components. So, no effect on your layout but there may be problems with some CSS selectors.
  • The server’s entry point also need to be processed by Forket. This means that it needs to be inside the src directory. Usually that's the case but who knows.
  • There must be at least one file in the root directory with “use client” directive. Forket need to inject some client-side utilities in order to operate.
  • The client entry points (the components that have “use client” need to default export a component)

Materials/inspiration

About

Forket is a tool that splits your code to client and server so you have RSC (React Server Components) working without a framework.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published