Implement working screen-state management and remove extraneous loads

This commit is contained in:
Paul Frazee
2022-09-01 12:00:08 -05:00
parent 36e3697fd6
commit 558f8010eb
14 changed files with 118 additions and 245 deletions
-12
View File
@@ -1,12 +0,0 @@
import {useEffect} from 'react'
import {useStores} from '../../state'
type CB = () => void
/**
* This custom effect hook will trigger on every "navigation"
* Use this in screens to handle any loading behaviors needed
*/
export function useLoadEffect(cb: CB, deps: any[] = []) {
const store = useStores()
useEffect(cb, [store.nav.tab, ...deps])
}