Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
useEffect(() => {
const scrollableNodeRef = scrollableNodeProps.ref || scrollableNodeRef;
if (elRef.current) {
instance = new SimpleBarJS(elRef.current, {
...getOptions(deprecatedOptions),
...options,
...(scrollableNodeRef && {
scrollableNode: scrollableNodeRef.current
}),
...(contentNodeRef.current && {
contentNode: contentNodeRef.current
})
});
if (ref) {
ref.current = instance;
}
}
return () => {