Bluesky app fork with some witchin' additions 馃挮
0
fork

Configure Feed

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

at 518c6e3d8957a81d3af30601ae965180c19b6ee2 17 lines 380 B view raw
1import {useCallback, useRef} from 'react' 2import {useFocusEffect} from '@react-navigation/native' 3 4export function useRefreshOnFocus<T>(refetch: () => Promise<T>) { 5 const firstTimeRef = useRef(true) 6 7 useFocusEffect( 8 useCallback(() => { 9 if (firstTimeRef.current) { 10 firstTimeRef.current = false 11 return 12 } 13 14 refetch() 15 }, [refetch]), 16 ) 17}