Implement working screen-state management and remove extraneous loads
This commit is contained in:
parent
346385ce43
commit
bb51af5ae9
14 changed files with 118 additions and 245 deletions
|
@ -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])
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue