Closed
Description
First of all, thank you for this great project!
Right now custom props are not statically typed when using typescript. E.g,
<ReactP5Wrapper
sketch={sketch}
background="rgb(255, 255, 255)" // this is not typed
/>
// props are not strictly typed
p5.updateWithProps = (props) => {
...
};
Maybe we can implement generics that allow users to specify custom props so the type will be correct. For instance,
const ReactP5WrapperComponent<P = SketchProps>: FC<P5WrapperProps<P>> = ({
...
});
Not tested, but it will probably look something like that.