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 346385ce43
commit bb51af5ae9
14 changed files with 118 additions and 245 deletions

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])
}