UNPKG

one

Version:

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

22 lines (21 loc) 691 B
import { StackRouter } from "@react-navigation/native"; const CustomStackRouter = options => { const router = StackRouter(options); const og = router.getStateForAction.bind(router); router.getStateForAction = (state, action, options2) => { const next = og(state, action, options2); if (action.type === "NAVIGATE") { if (next?.routes) { const outRoutes = next.routes; const firstRoute = outRoutes[0]; if (firstRoute.name.includes("[...")) { if (outRoutes.every(x => x.name === firstRoute.name)) {} } } } return next; }; return router; }; export { CustomStackRouter }; //# sourceMappingURL=OneStackRouter.mjs.map