0.0.5 • Published 2 years ago
@tobbe.dev/rsc-test v0.0.5
RSC Test
This is an npm package intended to test React Server Component implementations.
Currently it includes a single React component, RscForm. The component has the
'use client' directive at the top of the file because internally it uses
React's useState(), and so can only be used on the client. RscForm renders a
form that takes a form action as a prop. The form action is supposed to be a
React Server Action.
The package is published under an organization on purpose, to test that the RSC implementation supports org package names (even with dots in the name).
Example
import { RscForm } from '@tobbe.dev/rsc-test'
import { onSend } from './serverActions'
// ...
return (
<RscForm onSend={onSend} />
)
// ...