From a2de7397990a0b641ad60158796713ff3845ed6e Mon Sep 17 00:00:00 2001 From: alduzy Date: Tue, 30 Jul 2024 09:25:43 +0200 Subject: [PATCH 01/15] added repro --- apps/App.tsx | 8 ++--- apps/src/tests/Test2219.tsx | 66 +++++++++++++++++++++++++++++++++++++ apps/src/tests/index.ts | 1 + 3 files changed, 71 insertions(+), 4 deletions(-) create mode 100644 apps/src/tests/Test2219.tsx diff --git a/apps/App.tsx b/apps/App.tsx index 23a9af9c45..60f45c3180 100644 --- a/apps/App.tsx +++ b/apps/App.tsx @@ -1,11 +1,11 @@ import React from 'react'; import { enableFreeze } from 'react-native-screens'; -import Example from './Example'; -// import * as Test from './src/tests'; +// import Example from './Example'; +import * as Test from './src/tests'; enableFreeze(true); export default function App() { - return ; - // return ; + // return ; + return ; } diff --git a/apps/src/tests/Test2219.tsx b/apps/src/tests/Test2219.tsx new file mode 100644 index 0000000000..e16a2da292 --- /dev/null +++ b/apps/src/tests/Test2219.tsx @@ -0,0 +1,66 @@ +import * as React from 'react'; +import { Button, Pressable, StyleSheet, Text, View } from 'react-native'; +import { NavigationContainer, ParamListBase } from '@react-navigation/native'; +import { + NativeStackNavigationProp, + createNativeStackNavigator, +} from '@react-navigation/native-stack'; + +const Stack = createNativeStackNavigator(); + +type ScreenBaseProps = { + navigation: NativeStackNavigationProp; +}; + +export default function App() { + return ( + + + ( + + Hello there! + + ), + headerLeft: () => ( + console.log('does work')}> + Left + + ), + headerRight: () => ( + console.log('doesnt work')}> + Right + + ), + }} + /> + + + ); +} + +function First({ navigation }: ScreenBaseProps) { + return ( +