xobotyi/react-scrollbars-custom

Support for Hooks

ExplicitlyImplicit opened this issue · 1 comments

I'm trying this library out in one of my projects and trying to make it work with the useRef hook. Is this possible? It looks like the component will only accept a ref callback instead of a RefObject.

Are you using TypeScript?

I'm able to do this:

const scrollbarRef = useRef<Scrollbar & HTMLDivElement>(null);
<Scrollbar ref={scrollbarRef} {...otherProps} />