@react-navigation/native-stack 7.1.0 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -465,8 +465,6 @@ export function NativeStackView({
465
465
  }: Props) {
466
466
  const { setNextDismissedKey } = useDismissedRouteError(state);
467
467
 
468
- const { colors } = useTheme();
469
-
470
468
  useInvalidPreventRemoveError(descriptors);
471
469
 
472
470
  const modalRouteKeys = getModalRouteKeys(state.routes, descriptors);
@@ -478,7 +476,7 @@ export function NativeStackView({
478
476
  }, {});
479
477
 
480
478
  return (
481
- <SafeAreaProviderCompat style={{ backgroundColor: colors.background }}>
479
+ <SafeAreaProviderCompat>
482
480
  <ScreenStack style={styles.container}>
483
481
  {state.routes.concat(state.preloadedRoutes).map((route, index) => {
484
482
  const descriptor =
@@ -12,7 +12,6 @@ import {
12
12
  type RouteProp,
13
13
  type StackNavigationState,
14
14
  useLinkBuilder,
15
- useTheme,
16
15
  } from '@react-navigation/native';
17
16
  import * as React from 'react';
18
17
  import { Animated, Image, StyleSheet, View } from 'react-native';
@@ -43,7 +42,6 @@ const TRANSPARENT_PRESENTATIONS = [
43
42
  export function NativeStackView({ state, descriptors, describe }: Props) {
44
43
  const parentHeaderBack = React.useContext(HeaderBackContext);
45
44
  const { buildHref } = useLinkBuilder();
46
- const { colors } = useTheme();
47
45
 
48
46
  const preloadedDescriptors =
49
47
  state.preloadedRoutes.reduce<NativeStackDescriptorMap>((acc, route) => {
@@ -52,7 +50,7 @@ export function NativeStackView({ state, descriptors, describe }: Props) {
52
50
  }, {});
53
51
 
54
52
  return (
55
- <SafeAreaProviderCompat style={{ backgroundColor: colors.background }}>
53
+ <SafeAreaProviderCompat>
56
54
  {state.routes.concat(state.preloadedRoutes).map((route, i) => {
57
55
  const isFocused = state.index === i;
58
56
  const previousKey = state.routes[i - 1]?.key;