React / foldkit-react-codegen
When to use it
- Use it to get portable React rendering code for views that are plain markup, attributes, and events: a design-system handoff, a React port, or sharing presentational views with a React app.
- Do not use it to run a Foldkit application inside React. The output is
only the view: no Model,
update, Commands, Subscriptions, or Mounts. To embed a whole program, or to use a React component from a Foldkit view, usefoldkit-react, which keeps every Foldkit semantic.
The compiled view owns nothing. Whatever calls it supplies model and
dispatch, typically a React component holding the state, or a Foldkit program
through foldkit-react.
Install
sh
pnpm add -D foldkit-react-codegen typescript