UNPKG

one

Version:

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

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