UNPKG

one

Version:

One is a React framework for web, iOS, and Android apps.

18 lines (15 loc) • 556 B
import { useIsomorphicLayoutEffect } from "@vxrn/use-isomorphic-layout-effect"; import { NAVIGATOR_CONFIG } from "../headless/children.mjs"; import { useNavigation } from "../router/useNavigation.mjs"; function Screen({ name, options }) { const navigation = useNavigation(name); useIsomorphicLayoutEffect(() => { if (options && Object.keys(options).length) { navigation.setOptions(options); } }, [navigation, options]); return null; } Object.assign(Screen, { [NAVIGATOR_CONFIG]: true }); export { Screen }; //# sourceMappingURL=Screen.mjs.map