Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
12345678910111213141516171819202122import {useCallback, useMemo, useState} from 'react'
export function useInteractionState() { const [state, setState] = useState(false)
const onIn = useCallback(() => { setState(true) }, []) const onOut = useCallback(() => { setState(false) }, [])
return useMemo( () => ({ state, onIn, onOut, }), [state, onIn, onOut], )}