speice.io/blog/2024-11-15-playing-with-fire/1-introduction/Gasket.tsx

16 lines
358 B
TypeScript

import Canvas, {PainterContext} from "../src/Canvas";
import {useContext} from "react";
export function Render({f}) {
const {setPainter} = useContext(PainterContext);
setPainter(f);
return <></>;
}
export default function Gasket({f}) {
return (
<Canvas width={500} height={500}>
<Render f={f}/>
</Canvas>
)
}