CReact

Use JSX to automate durable workflows

app.tsx
export function App() {
  const [sites, setSites] = createSignal<SiteConfig[]>([]);

  return (
    <>
      <Channel port={3000} onGenerate={handleGenerate} onList={handleList} />
      <Claude>
        <Show when={() => pendingGeneration()}>
          {(gen) => (
            <GenerateHtml prompt={gen().prompt} />
          )}
        </Show>
      </Claude>
      <AWS region="us-east-1">
        <For each={() => sites()}>
          {(site) => (
            <WebSite name={() => site().path} content={() => site().content} />
          )}
        </For>
      </AWS>
    </>
  );
}