this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at e28f6d2f370b4e882ed6f23d08ca0f8d94dbac5f 21 lines 377 B view raw
1import {useCallback, useMemo, useState} from 'react' 2 3export function useInteractionState() { 4 const [state, setState] = useState(false) 5 6 const onIn = useCallback(() => { 7 setState(true) 8 }, []) 9 const onOut = useCallback(() => { 10 setState(false) 11 }, []) 12 13 return useMemo( 14 () => ({ 15 state, 16 onIn, 17 onOut, 18 }), 19 [state, onIn, onOut], 20 ) 21}