Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
React.useEffect(() => {
if (!button.current || !tooltip.current) return
const nextStyle = rightOf(button.current).styleFor(tooltip.current)
setStyle(nextStyle)
}, [])