From 38f56d71c8fee5d955f05992ef1850fb9e9f006c Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Thu, 18 Apr 2024 23:42:16 +0100 Subject: [PATCH] add repro --- ReproducerApp/App.tsx | 129 +++++++++---------------------------- ReproducerApp/package.json | 3 +- 2 files changed, 33 insertions(+), 99 deletions(-) diff --git a/ReproducerApp/App.tsx b/ReproducerApp/App.tsx index 125fe1b..dac8174 100644 --- a/ReproducerApp/App.tsx +++ b/ReproducerApp/App.tsx @@ -5,114 +5,47 @@ * @format */ -import React from 'react'; -import type {PropsWithChildren} from 'react'; -import { - SafeAreaView, - ScrollView, - StatusBar, - StyleSheet, - Text, - useColorScheme, - View, -} from 'react-native'; +import {useState} from 'react'; +import {TextInput, View, SafeAreaView, Text} from 'react-native'; -import { - Colors, - DebugInstructions, - Header, - LearnMoreLinks, - ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; +export default function App() { + return ( + + + + + + + ); +} -type SectionProps = PropsWithChildren<{ - title: string; -}>; +function WithValueProp() { + const [text, setText] = useState(''); -function Section({children, title}: SectionProps): React.JSX.Element { - const isDarkMode = useColorScheme() === 'dark'; return ( - - - {title} - - - {children} - + + + {text} ); } -function App(): React.JSX.Element { - const isDarkMode = useColorScheme() === 'dark'; - - const backgroundStyle = { - backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, - }; +function WithoutValueProp() { + const [text, setText] = useState(''); return ( - - + - -
- -
- Edit App.tsx to change this - screen and then come back to see your edits. -
-
- -
-
- -
-
- Read the docs to discover what to do next: -
- -
- - + {text} + ); } - -const styles = StyleSheet.create({ - sectionContainer: { - marginTop: 32, - paddingHorizontal: 24, - }, - sectionTitle: { - fontSize: 24, - fontWeight: '600', - }, - sectionDescription: { - marginTop: 8, - fontSize: 18, - fontWeight: '400', - }, - highlight: { - fontWeight: '700', - }, -}); - -export default App; diff --git a/ReproducerApp/package.json b/ReproducerApp/package.json index 07dec28..a009e89 100644 --- a/ReproducerApp/package.json +++ b/ReproducerApp/package.json @@ -32,5 +32,6 @@ }, "engines": { "node": ">=18" - } + }, + "packageManager": "yarn@1.22.19+sha1.4ba7fc5c6e704fce2066ecbfb0b0d8976fe62447" }