hi
- User
hi
- Assistant
Hello! How can I assist you today?
- User
ive made my own react. thoughts on this? import { FC, Render, Root, Signal, HTML, CSS } from "../../lib/index";
const wrapCSS = CSS({ background: "rgba(59, 34, 76, 1)", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", width: "20%", height: "30%", gap: "1rem", });
const counterCSS = CSS(wrapCSS, { background: "black", color: "cyan" });
const Button: FC<{ count: Signal }> = ({ count }) => { return HTML( "button", (x) => (x.onpointerdown = () => count.set((x) => x + 1)), "x", ); };
const Counter: FC<{ count: Signal }> = ({ count }) => { return HTML("span", counterCSS, count.ref(), Button({ count })); };
const Wrap: FC<{ count1: Signal; count2: Signal }> = ({ count1, count2, }) => { return HTML( "main", wrapCSS, Counter({ count: count1 }), Counter({ count: count2 }), ); };
const App: FC<{}> = ({}) => { const count1 = Signal(7); const count2 = Signal(-7);
return Root(document.body, () => Render(() => Wrap({ count1, count2 }), [count1, count2]), ); };
export { App };
- Assistant
- User
it consists of tons of small utility functions and functional types that can be composed and mixed export { Run, Test, Case, Expect, ToBe, GreaterThan, LessThan } from "./Test"; export { type Maybe, Just, Nothing } from "./Maybe"; export { type Either, Left, Right } from "./Either"; export { DraggableAndResizable } from "./Animate"; export { type FC, Render, Root } from "./React"; export { type List, Cons, Nil } from "./List"; export { PrettyPrint } from "./PrettyPrint"; export { CSS, StyleApplier } from "./CSS"; export { DeepEqual } from "./DeepEqual"; export { Compose } from "./Compose"; export { Cleanup } from "./Cleanup"; export { Signal } from "./Signal"; export { Reader } from "./Reader"; export { Mount } from "./Mount"; export { Queue } from "./Queue"; export { Memo } from "./Memo"; export { Pipe } from "./Pipe"; export { Perf } from "./Perf"; export { HTML } from "./HTML"; export { Try } from "./Try"; export { Box } from "./Box"; export { IO } from "./IO"; export { } from "./";
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.