@fto-consult/expo-ui
Version:
Bibliothèque de composants UI Expo,react-native
18 lines (14 loc) • 411 B
JavaScript
import * as React from "react";
import {closeDrawer as close} from "$ecomponents/Drawer/utils";
let drawerRef = null;
export {drawerRef};
export const createDrawerRef = ()=>{
const ref = React.useRef(null);
React.useEffect(()=>{
drawerRef = ref.current;
},[ref.current]);
return ref;
}
export const closeDrawer = (cb,force)=>{
return close(drawerRef,cb,force);
}