| /expo/packages/@expo/cli/src/start/server/type-generation/__typetests__/ |
| H A D | route.test.ts | 12 const router = useRouter(); constant 19 expectError(router.push('should-error')); 23 expectType<void>(router.push('/apple')); 78 router.push({ 87 router.push({ 96 router.push({ 105 router.push({ 114 router.push({ 123 router.push({ 132 router.push({ [all …]
|
| /expo/docs/common/ |
| H A D | use-nprogress.ts | 13 const router = useRouter(); constant 16 router?.events.on('routeChangeStart', nprogress.start); 17 router?.events.on('routeChangeComplete', nprogress.done); 18 router?.events.on('routeChangeError', nprogress.done); 21 router?.events.off('routeChangeStart', nprogress.start); 22 router?.events.off('routeChangeComplete', nprogress.done); 23 router?.events.off('routeChangeError', nprogress.done);
|
| /expo/packages/expo-router/src/__tests__/ |
| H A D | navigation.test.tsx | 7 router, 21 const router = useRouter(); 173 act(() => router.back()); 180 act(() => router.back()); 208 act(() => router.push('/')); 235 router.push({ 392 act(() => router.back()); 546 act(() => router.back()); 573 act(() => router.back()); 657 act(() => router.back()); [all …]
|
| /expo/docs/components/plugins/ |
| H A D | VersionedRedirectNotification.tsx | 1 import { useRouter } from 'next/compat/router'; 7 const router = useRouter(); 11 if (router?.query) { 12 setVisible(router.query.hasOwnProperty(showForQuery)); 14 }, [router?.query]);
|
| /expo/docs/ui/components/Footer/ |
| H A D | Footer.test.tsx | 2 import { RouterContext } from 'next/dist/shared/lib/router-context'; 3 import { NextRouter } from 'next/router'; 9 const withTestRouter = (tree: ReactElement, router: Partial<NextRouter> = {}) => ( 15 const router = { pathname: '/example/' }; 16 render(withTestRouter(<Footer title="test-title" />, router)); 23 const router = { pathname: '/sdk/' }; 24 render(withTestRouter(<Footer title="test-title" />, router)); 30 const router = { pathname: '/sdk/' }; 31 render(withTestRouter(<Footer title="test-title" />, router)); 37 const router = { pathname: '/sdk/' }; [all …]
|
| H A D | Footer.tsx | 1 import { useRouter } from 'next/compat/router'; 18 const router = useRouter(); 19 const isAPIPage = router?.pathname.includes('/sdk/') ?? false; 29 {router?.pathname && <EditPageLink pathname={router.pathname} />}
|
| /expo/docs/pages/routing/ |
| H A D | next-steps.mdx | 15 href="/router/advanced/stack" 22 href="/router/advanced/tabs" 29 href="/router/reference/hooks/" 36 href="/router/reference/search-parameters/" 43 href="/router/migrate/from-react-navigation/" 50 href="/router/reference/troubleshooting/" 57 href="/router/reference/faq/"
|
| H A D | navigating-pages.mdx | 19 /* @info Import the <b>Link</b> React component from <b>expo-router</b> */ 20 import { Link } from 'expo-router'; 45 import { Link } from "expo-router"; 65 import { router } from 'expo-router'; 69 router.replace('/login'); 74 The `router` object is immutable and contains the following functions: 88 /* @info Import the <b>Link</b> React component from <b>expo-router</b> */ 89 import { Link } from 'expo-router'; 115 import { Link } from 'expo-router'; 132 Use **router.replace()** to replace the current screen imperatively. [all …]
|
| H A D | layouts.mdx | 18 import { Slot } from 'expo-router'; 28 import { Slot } from 'expo-router'; 46 import { Tabs } from 'expo-router'; 54 import { Stack } from 'expo-router'; 88 import { Stack } from 'expo-router'; 105 href="/router/advanced/stack" 112 href="/router/advanced/tabs" 119 href="/router/advanced/drawer" 126 href="/router/advanced/modals" 137 href="/router/advanced/nesting-navigators" [all …]
|
| /expo/packages/expo-router/src/views/ |
| H A D | Navigator.tsx | 18 router: RouterFactory<any, any, any>; 29 router?: Parameters<typeof useNavigationBuilder>[0]; 33 export function Navigator({ initialRouteName, screenOptions, children, router }: NavigatorProps) { 55 router={router}> 67 router = StackRouter, 69 const { state, navigation, descriptors, NavigationContent } = useNavigationBuilder(router, { 84 router,
|
| H A D | Unmatched.tsx | 26 const router = useRouter(); 46 if (router.canGoBack()) { 47 router.back(); 49 router.replace('/');
|
| /expo/docs/pages/router/migrate/ |
| H A D | from-react-navigation.mdx | 154 import { Stack } from 'expo-router'; 175 import { Tabs } from 'expo-router'; 189 + import { useRouter } from 'expo-router'; 196 + const router = useRouter(); 197 + router.push('/users/bacon'); 204 + import { useLocalSearchParams } from 'expo-router'; 260 import { useRouter } from 'expo-router'; 263 const router = useRouter(); 269 router.replace('/'); 343 import { Slot } from 'expo-router'; [all …]
|
| /expo/apps/router-e2e/__e2e__/auth/ |
| H A D | ctx.tsx | 1 import { router } from 'expo-router'; 25 router.replace('/');
|
| /expo/docs/ui/components/Sidebar/ |
| H A D | SidebarFooter.tsx | 8 import { useRouter } from 'next/compat/router'; 16 const router = useRouter(); 17 const isArchive = router?.pathname ? getPageSection(router.pathname) === 'archive' : false;
|
| H A D | SidebarLink.tsx | 5 import { useRouter } from 'next/compat/router'; 29 const router = useRouter(); 35 if (router?.asPath.match(/\/versions\/[\w.]+\/$/) || router?.asPath === '/versions/latest/') { 42 linkUrl === stripVersionFromPath(router?.pathname) || 43 linkUrl === stripVersionFromPath(router?.asPath)
|
| /expo/packages/expo-router/build/views/ |
| H A D | Unmatched.js | 26 const router = (0, hooks_1.useRouter)(); 41 if (router.canGoBack()) { 42 router.back(); 45 router.replace('/');
|
| H A D | Navigator.js | 40 function Navigator({ initialRouteName, screenOptions, children, router }) { 52 …reenOptions: screenOptions, screens: sorted, contextKey: contextKey, router: router }, otherSlot)); property 55 …igator({ initialRouteName, screenOptions, children, screens, contextKey, router = native_1.StackRo… 56 … state, navigation, descriptors, NavigationContent } = (0, native_1.useNavigationBuilder)(router, { 68 router,
|
| /expo/docs/providers/ |
| H A D | page-api-version.tsx | 1 import { useRouter } from 'next/compat/router'; 27 const router = useRouter(); 28 const version = getVersionFromPath(router?.pathname ?? ''); 33 router?.push(replaceVersionInPath(router.pathname, newVersion));
|
| /expo/packages/expo-router/build/ |
| H A D | imperative-api.js | 3 exports.router = void 0; 5 exports.router = {
|
| /expo/packages/@expo/metro-runtime/src/location/ |
| H A D | install.native.ts | 22 if (!manifest?.extra?.router?.origin) { 38 const productionBaseUrl = manifest?.extra?.router?.origin; 77 if (manifest?.extra?.router?.origin !== false) {
|
| /expo/docs/pages/router/reference/ |
| H A D | redirects.mdx | 16 import { Redirect } from 'expo-router'; 42 import { useRouter, useFocusEffect } from 'expo-router'; 45 const router = useRouter(); 51 router.replace('/profile/settings');
|
| /expo/docs/pages/router/advanced/ |
| H A D | modals.mdx | 14 <Video file="expo-router/modal.mp4" /> 23 import { Stack } from 'expo-router'; 48 import { Link } from 'expo-router'; 63 import { Link, router } from 'expo-router'; 68 const isPresented = router.canGoBack(); 86 href="/router/advanced/platform-specific-modules/"
|
| H A D | stack.mdx | 17 import { Stack } from 'expo-router/stack'; 29 import { Stack } from 'expo-router'; 51 import { Link, Stack } from 'expo-router'; 87 You can use the imperative API `router.setParams()` function to configure the route dynamically. 91 import { Stack, useLocalSearchParams, useRouter } from 'expo-router'; 94 const router = useRouter(); 106 router.setParams({ name: 'Updated' }); 124 import { Stack } from 'expo-router'; 155 import { Stack } from 'expo-router'; 195 import { Stack } from 'expo-router'; [all …]
|
| /expo/packages/expo-router/plugin/build/ |
| H A D | index.js | 29 router: { 31 ...config.extra?.router,
|
| /expo/packages/expo-router/plugin/src/ |
| H A D | index.ts | 44 router: { 46 ...config.extra?.router,
|