From 81f35b35da9b3daab74da9f048b126347c136fdc Mon Sep 17 00:00:00 2001 From: Kacper Kafara Date: Wed, 28 Aug 2024 12:32:12 +0200 Subject: [PATCH 01/49] Add repros --- apps/App.tsx | 8 +- apps/src/tests/TestHeaderRight.tsx | 69 +++++++++++++++++ apps/src/tests/TestHeaderTitle.tsx | 120 +++++++++++++++++++++++++++++ apps/src/tests/index.ts | 2 + 4 files changed, 195 insertions(+), 4 deletions(-) create mode 100644 apps/src/tests/TestHeaderRight.tsx create mode 100644 apps/src/tests/TestHeaderTitle.tsx diff --git a/apps/App.tsx b/apps/App.tsx index 23a9af9c45..e19111891c 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/TestHeaderRight.tsx b/apps/src/tests/TestHeaderRight.tsx new file mode 100644 index 0000000000..f445157711 --- /dev/null +++ b/apps/src/tests/TestHeaderRight.tsx @@ -0,0 +1,69 @@ +import React, {useLayoutEffect} from 'react'; +import {NavigationContainer} from '@react-navigation/native'; +import {createNativeStackNavigator} from '@react-navigation/native-stack'; +import {useNavigation} from '@react-navigation/native'; +import {Button, Text, TextInput, View} from 'react-native'; +import {NativeStackNavigationProp} from '@react-navigation/native-stack'; +import { HeaderBackButton, HeaderButton } from '@react-navigation/elements'; +type RootStackNavigatorParamsList = { + Home: undefined; + Details: undefined; +}; +const Stack = createNativeStackNavigator(); +const HomeScreen = () => { + const navigation = + useNavigation>(); + const onHandlePress = () => { + navigation.navigate('Details'); + }; + return ( + + HomeScreen + +