UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

17 lines (16 loc) 367 B
import { useRouter } from "../hooks.mjs"; import { useFocusEffect } from "../useFocusEffect.mjs"; function Redirect({ href }) { const router = useRouter(); return useFocusEffect(() => { try { router.replace(href); } catch (error) { console.error(error); } }, [href]), null; } export { Redirect }; //# sourceMappingURL=Redirect.mjs.map