Hi, thanks for the great project!
I’d like to suggest a small but meaningful type improvement to the userRef prop.
Currently, it’s typed as:
userRef?: React.MutableRefObject<HTMLDivElement>;
However, this leads to a TypeScript error when using useRef in the typical React way:
const ref = useRef<HTMLDivElement | null>(null); // Error: Type 'MutableRefObject<HTMLDivElement | null>' is not assignable to type 'MutableRefObject<HTMLDivElement>'
To fix this, and to support the standard usage pattern where refs are initialized as null before mounting, I suggest changing the type to:
userRef?: React.MutableRefObject<HTMLDivElement | null>;
This makes the prop fully compatible with React’s recommended useRef pattern and prevents unnecessary type casting or unsafe assertions.
Thanks again!