forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import React from 'react'
2
3export function useInteractionState() {
4 const [state, setState] = React.useState(false)
5
6 const onIn = React.useCallback(() => {
7 setState(true)
8 }, [])
9 const onOut = React.useCallback(() => {
10 setState(false)
11 }, [])
12
13 return React.useMemo(
14 () => ({
15 state,
16 onIn,
17 onOut,
18 }),
19 [state, onIn, onOut],
20 )
21}