react-navigation / react-navigation

Compare 24e4333 ... +1 ... 6730690

Coverage Reach
core/src/getStateFromPath.tsx core/src/useNavigationBuilder.tsx core/src/getPathFromState.tsx core/src/BaseNavigationContainer.tsx core/src/useEventEmitter.tsx core/src/__tests__/__fixtures__/MockRouter.tsx core/src/useFocusEffect.tsx core/src/useOnAction.tsx core/src/useNavigationHelpers.tsx core/src/useSyncState.tsx core/src/useOptionsGetters.tsx core/src/SceneView.tsx core/src/useFocusEvents.tsx core/src/useNavigationCache.tsx core/src/isSerializable.tsx core/src/getActionFromState.tsx core/src/useOnGetState.tsx core/src/useDescriptors.tsx core/src/EnsureSingleNavigator.tsx core/src/StaticContainer.tsx core/src/useNavigationState.tsx core/src/useFocusedListenersChildrenAdapter.tsx core/src/useRegisterNavigator.tsx core/src/useIsFocused.tsx core/src/useOnRouteFocus.tsx core/src/useStateGetters.tsx core/src/useFocusedListeners.tsx core/src/getFocusedRouteNameFromRoute.tsx core/src/useScheduleUpdate.tsx core/src/useChildActionListeners.tsx core/src/NavigationStateContext.tsx core/src/useNavigation.tsx core/src/useRoute.tsx core/src/createNavigatorFactory.tsx core/src/useCurrentRender.tsx core/src/NavigationBuilderContext.tsx core/src/NavigationContext.tsx core/src/NavigationRouteContext.tsx core/src/CurrentRenderContext.tsx core/src/isArrayEqual.tsx core/src/NavigationHelpersContext.tsx native/src/useLinking.tsx native/src/useLinking.native.tsx native/src/useThenable.tsx native/src/NavigationContainer.tsx native/src/ServerContainer.tsx native/src/useBackButton.tsx native/src/theming/DefaultTheme.tsx native/src/theming/ThemeProvider.tsx native/src/theming/ThemeContext.tsx native/src/LinkingContext.tsx native/src/ServerContext.tsx routers/src/TabRouter.tsx routers/src/StackRouter.tsx routers/src/DrawerRouter.tsx routers/src/BaseRouter.tsx routers/src/CommonActions.tsx

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.


@@ -16,7 +16,7 @@
Loading
16 16
    setNumberOfChildrenListeners,
17 17
  ] = React.useState(0);
18 18
  const optionsGettersFromChild = React.useRef<
19 -
    Record<string, (() => object | undefined | null) | undefined>
19 +
    Record<string, () => object | undefined | null>
20 20
  >({});
21 21
22 22
  const { addOptionsGetter: parentAddOptionsGetter } = React.useContext(
@@ -63,7 +63,8 @@
Loading
63 63
64 64
      return () => {
65 65
        setNumberOfChildrenListeners((prev) => prev - 1);
66 -
        optionsGettersFromChild.current[key] = undefined;
66 +
        // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
67 +
        delete optionsGettersFromChild.current[key];
67 68
      };
68 69
    },
69 70
    []

@@ -52,6 +52,7 @@
Loading
52 52
53 53
  const { addOptionsGetter, hasAnyChildListener } = useOptionsGetters({
54 54
    key: route.key,
55 +
    getState,
55 56
    getOptions,
56 57
  });
57 58

Learn more Showing 1 files with coverage changes found.

Changes in packages/core/src/useOptionsGetters.tsx
-3
+3
Loading file...
Files Coverage
packages 0.20% 90.35%
Project Totals (57 files) 90.35%
Loading