import React from "react"; import { useNavigation } from "@applicaster/zapp-react-native-utils/reactHooks"; export const ScreenDataContext = React.createContext(null); // Use this only to provide initial screenData context, before the Transitioner and Screen is rendered. export const withScreenDataContextProvider = (Component: any) => { return function ScreenDataContextProvider(props: any) { const { activeRiver } = useNavigation(); // use only initial activeRiver as this context should only be used for "Home", initial route const screenData = React.useMemo(() => ({ screen: activeRiver }), []); return ( ); }; };