Home
last modified time | relevance | path

Searched refs:hook (Results 1 – 25 of 137) sorted by relevance

123456

/expo/packages/expo-asset/src/__tests__/
H A DAssetHooks-test.ts22 expect(hook.result.current[ASSETS]).toBeUndefined();
23 await hook.waitForNextUpdate();
24 expect(hook.result.current[ASSETS]).toBe(STUB_ASSETS);
29 await hook.waitForNextUpdate();
31 expect(hook.result.current[ASSETS]).toBe(STUB_ASSETS);
34 hook.rerender(partialModules);
41 await hook.waitForNextUpdate();
44 hook.unmount();
53 expect(hook.result.current[ERROR]).toBeUndefined();
54 await hook.waitForNextUpdate();
[all …]
/expo/packages/expo-font/src/__tests__/
H A DFontHooks-test.ts23 const hook = renderHook(() => useFonts(FONTS)); constant
25 expect(hook.result.current[DATA]).toBe(false);
26 await hook.waitForNextUpdate();
27 expect(hook.result.current[DATA]).toBe(true);
32 await hook.waitForNextUpdate();
39 hook.rerender(partialFonts as typeof FONTS);
41 expect(hook.result.current[DATA]).toBe(true);
47 await hook.waitForNextUpdate();
49 expect(hook.result.current[DATA]).toBe(true);
50 hook.unmount();
[all …]
/expo/packages/expo-screen-capture/src/__tests__/
H A DScreenCaptureHook-test.native.js20 const hook = renderHook(() => ScreenCapture.usePreventScreenCapture()); constant
21 hook.rerender();
24 hook.unmount();
29 const hook = renderHook(() => ScreenCapture.usePreventScreenCapture()); constant
30 hook.rerender();
33 hook.unmount();
38 const hook = renderHook(({ key }) => ScreenCapture.usePreventScreenCapture(key)); constant
39 hook.rerender({ key: 'foo' });
40 hook.rerender({ key: 'bar' });
45 hook.unmount();
/expo/android/vendored/unversioned/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/
H A DNativeViewGestureHandler.kt17 private var hook: NativeViewGestureHandlerHook = defaultHook variable in com.swmansion.gesturehandler.core.NativeViewGestureHandler
44 … if (super.shouldRecognizeSimultaneously(handler) || hook.shouldRecognizeSimultaneously(handler)) { in shouldRecognizeSimultaneously()
65 …} else state == STATE_ACTIVE && canBeInterrupted && (!hook.shouldCancelRootViewGestureHandlerIfNec… in shouldRecognizeSimultaneously()
75 is NativeViewGestureHandlerHook -> this.hook = view in onPrepare()
76 is ReactEditText -> this.hook = EditTextHook(this, view) in onPrepare()
77 is ReactSwipeRefreshLayout -> this.hook = SwipeRefreshLayoutHook(this, view) in onPrepare()
89 hook.afterGestureEnd(event) in onHandle()
101 hook.wantsToHandleEventBeforeActivation() -> { in onHandle()
102 hook.handleEventBeforeActivation(event) in onHandle()
105 if (hook.canBegin()) { in onHandle()
[all …]
/expo/packages/@expo/cli/src/utils/
H A Dexit.ts59 const hook = createExitHook(signal); constant
60 hooks.push([signal, hook]);
61 process.on(signal, hook);
64 for (const [signal, hook] of hooks) { constant
65 process.removeListener(signal, hook);
/expo/android/vendored/sdk48/react-native-gesture-handler/android/src/main/java/abi48_0_0/com/swmansion/gesturehandler/core/
H A DNativeViewGestureHandler.kt15 private var hook: NativeViewGestureHandlerHook = defaultHook variable in abi48_0_0.com.swmansion.gesturehandler.core.NativeViewGestureHandler
42 … if (super.shouldRecognizeSimultaneously(handler) || hook.shouldRecognizeSimultaneously(handler)) { in shouldRecognizeSimultaneously()
63 …} else state == STATE_ACTIVE && canBeInterrupted && (!hook.shouldCancelRootViewGestureHandlerIfNec… in shouldRecognizeSimultaneously()
73 is NativeViewGestureHandlerHook -> this.hook = view in onPrepare()
74 is ReactEditText -> this.hook = EditTextHook(this, view) in onPrepare()
86 hook.afterGestureEnd(event) in onHandle()
98 hook.wantsToHandleEventBeforeActivation() -> { in onHandle()
99 hook.handleEventBeforeActivation(event) in onHandle()
102 if (hook.canBegin()) { in onHandle()
123 this.hook = defaultHook in onReset()
/expo/android/vendored/sdk47/react-native-gesture-handler/android/src/main/java/abi47_0_0/com/swmansion/gesturehandler/core/
H A DNativeViewGestureHandler.kt15 private var hook: NativeViewGestureHandlerHook = defaultHook variable in abi47_0_0.com.swmansion.gesturehandler.core.NativeViewGestureHandler
42 … if (super.shouldRecognizeSimultaneously(handler) || hook.shouldRecognizeSimultaneously(handler)) { in shouldRecognizeSimultaneously()
63 …} else state == STATE_ACTIVE && canBeInterrupted && (!hook.shouldCancelRootViewGestureHandlerIfNec… in shouldRecognizeSimultaneously()
73 is NativeViewGestureHandlerHook -> this.hook = view in onPrepare()
74 is ReactEditText -> this.hook = EditTextHook(this, view) in onPrepare()
86 hook.afterGestureEnd(event) in onHandle()
98 hook.wantsToHandleEventBeforeActivation() -> { in onHandle()
99 hook.handleEventBeforeActivation(event) in onHandle()
102 if (hook.canBegin()) { in onHandle()
123 this.hook = defaultHook in onReset()
/expo/android/vendored/sdk49/react-native-gesture-handler/android/src/main/java/abi49_0_0/com/swmansion/gesturehandler/core/
H A DNativeViewGestureHandler.kt17 private var hook: NativeViewGestureHandlerHook = defaultHook variable in abi49_0_0.com.swmansion.gesturehandler.core.NativeViewGestureHandler
44 … if (super.shouldRecognizeSimultaneously(handler) || hook.shouldRecognizeSimultaneously(handler)) { in shouldRecognizeSimultaneously()
65 …} else state == STATE_ACTIVE && canBeInterrupted && (!hook.shouldCancelRootViewGestureHandlerIfNec… in shouldRecognizeSimultaneously()
75 is NativeViewGestureHandlerHook -> this.hook = view in onPrepare()
76 is ReactEditText -> this.hook = EditTextHook(this, view) in onPrepare()
77 is ReactSwipeRefreshLayout -> this.hook = SwipeRefreshLayoutHook(this, view) in onPrepare()
89 hook.afterGestureEnd(event) in onHandle()
101 hook.wantsToHandleEventBeforeActivation() -> { in onHandle()
102 hook.handleEventBeforeActivation(event) in onHandle()
105 if (hook.canBegin()) { in onHandle()
[all …]
/expo/apps/native-component-list/src/screens/
H A DSafeAreaContextScreen.tsx24 const [focused, setFocused] = React.useState<'hook' | 'view'>('hook');
27 if (focused === 'hook') {
38 <HeadingText>Using useSafeArea hook</HeadingText>
58 title="Switch to SafeAreaConsumer & useSafeArea hook"
59 onPress={() => setFocused('hook')}
/expo/packages/expo/src/launch/
H A DwithDevTools.tsx8 // This hook can be optionally imported because __DEV__ never changes during runtime.
9 // Using __DEV__ like this enables tree shaking to remove the hook in production.
H A DwithDevTools.ios.tsx13 // This hook can be optionally imported because __DEV__ never changes during runtime.
14 // Using __DEV__ like this enables tree shaking to remove the hook in production.
/expo/docs/pages/build-reference/
H A Dnpm-hooks.mdx12 - `eas-build-on-success` - this hook is triggered at the end of the build process if the build was …
13 - `eas-build-on-error` - this hook is triggered at the end of the build process if the build failed.
14 - `eas-build-on-complete` - this hook is triggered at the end of the build process. You can check t…
15 - `eas-build-on-cancel` - this hook is triggered if the build is canceled.
38 ## Platform-specific hook behavior
/expo/docs/pages/versions/unversioned/sdk/
H A Dkeep-awake.mdx13 **`expo-keep-awake`** provides a React hook that prevents the screen from sleeping and a pair of fu…
23 ### Example: hook
25 <SnackInline label='Keep Awake hook' dependencies={['expo-keep-awake']}>
/expo/docs/pages/versions/v48.0.0/sdk/
H A Dkeep-awake.mdx13 **`expo-keep-awake`** provides a React hook that prevents the screen from sleeping and a pair of fu…
23 ### Example: hook
25 <SnackInline label='Keep Awake hook' dependencies={['expo-keep-awake']}>
/expo/docs/pages/versions/v49.0.0/sdk/
H A Dkeep-awake.mdx13 **`expo-keep-awake`** provides a React hook that prevents the screen from sleeping and a pair of fu…
23 ### Example: hook
25 <SnackInline label='Keep Awake hook' dependencies={['expo-keep-awake']}>
/expo/docs/pages/versions/v46.0.0/sdk/
H A Dkeep-awake.mdx13 **`expo-keep-awake`** provides a React hook that prevents the screen from sleeping and a pair of fu…
29 ### Example: hook
31 <SnackInline label='Keep Awake hook' dependencies={['expo-keep-awake']}>
/expo/docs/pages/versions/v47.0.0/sdk/
H A Dkeep-awake.mdx13 **`expo-keep-awake`** provides a React hook that prevents the screen from sleeping and a pair of fu…
29 ### Example: hook
31 <SnackInline label='Keep Awake hook' dependencies={['expo-keep-awake']}>
/expo/docs/pages/develop/user-interface/
H A Dsafe-areas.mdx64 #### Use `useSafeAreaInsets` hook
66hook that gives direct access to the safe area insets. It offers more flexibility and gives you mo…
79 Below is a minimal working example that uses the `useSafeAreaInsets` hook to apply top padding to a…
113 …AreaProvider>` as described in the [hooks section](#use-usesafeareainsets-hook). If you are doing …
H A Dfonts.mdx52 …Fonts` hook from `expo-font` package in your project. The hook keeps track of the loading state of…
71 Alternatively, you can use [`Font.loadAsync`](#use-fontloadasync-instead-of-the-usefonts-hook) to l…
75 Let's take a look at a minimal example that uses Inter font family. It uses [`useFonts` hook](/vers…
82 /* @info Import useFonts hook from 'expo-font'. */ import { useFonts } from 'expo-font'; /* @end */
165 …oject by using the `useFonts` hook. You can directly use this hook from the Google Fonts package. …
262 ### Use `Font.loadAsync` instead of the `useFonts` hook
264 …e the `useFonts` hook (for example, maybe you prefer class components), you can use `Font.loadAsyn…
/expo/docs/pages/modules/
H A Dandroid-lifecycle-listeners.mdx3 description: Learn about the mechanism that allows your library to hook into Android Activity and A…
10hook into these, and so setup instructions for React Native libraries often include steps to copy …
20 You can hook into the `Activity` lifecycle using `ReactActivityLifecycleListener`. `ReactActivityLi…
79 …istener` is a `ReactActivityLifecycleListener` derived class that you can hook into the lifecycles…
129 You can hook into the `Application` lifecycle using `ApplicationLifecycleListener`.
183 …ycleListener` is an `ApplicationLifecycleListener` derived class that can hook into the `Applicati…
/expo/packages/expo-notifications/build/
H A DuseLastNotificationResponse.js.map1hook always returns the notification response that was received most recently\n * (a notification …
/expo/docs/pages/router/reference/
H A Dtesting.mdx90 …es the value of the [`usePathname`](/router/reference/hooks/#usepathname) hook on the current `scr…
99 …es the value of the [`useSegments`](/router/reference/hooks/#usesegments) hook on the current `scr…
108 …e [`useLocalSearchParams`](/router/reference/hooks/#uselocalsearchparams) hook on the current `scr…
117 … using the value of [`useGlobalSearchParams`](/router/reference/hooks/#useglobalsearchparams) hook.
119 …[`useGlobalSearchParams`](/router/reference/hooks/#useglobalsearchparams) hook on the current `scr…
/expo/apps/router-e2e/__e2e__/auth/
H A Dctx.tsx7 // This hook can be used to access the user info.
/expo/ios/versioned-react-native/ABI48_0_0/ReactNative/Libraries/ReactNative/
H A DAppRegistry.d.ts98 hook: ComponentProviderInstrumentationHook,
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/Libraries/ReactNative/
H A DAppRegistry.d.ts98 hook: ComponentProviderInstrumentationHook,

123456