File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import '../../BrownfieldStore.brownie';
33import { Image } from 'expo-image' ;
44import { Link } from 'expo-router' ;
55import { Platform , StyleSheet , View } from 'react-native' ;
6- import { useStore } from '@callstack/brownie' ;
76
87import { HelloWave } from '@/components/hello-wave' ;
98import ParallaxScrollView from '@/components/parallax-scroll-view' ;
@@ -12,7 +11,7 @@ import { ThemedView } from '@/components/themed-view';
1211import { IconSymbol } from '@/components/ui/icon-symbol' ;
1312
1413export default function HomeScreen ( ) {
15- const [ counter , setState ] = useStore ( 'BrownfieldStore' , ( s ) => s . counter ) ;
14+ // TODO: const [counter, setState] = useStore('BrownfieldStore', (s) => s.counter);
1615
1716 return (
1817 < ParallaxScrollView
@@ -85,13 +84,13 @@ export default function HomeScreen() {
8584 alignContent : 'center' ,
8685 } }
8786 >
88- Brownie state store counter: { counter }
87+ Brownie state store counter: { 0 }
8988 </ ThemedText >
9089 < IconSymbol
9190 name = "plus"
9291 size = { 24 }
9392 color = "black"
94- onPress = { ( ) => setState ( ( prev ) => ( { counter : prev . counter + 1 } ) ) }
93+ // onPress={() => setState((prev) => ({ counter: prev.counter + 1 }))}
9594 />
9695 </ View >
9796 </ ThemedView >
Original file line number Diff line number Diff line change @@ -61,8 +61,6 @@ export function HomeScreen({
6161 color = { colors . secondary }
6262 title = "Go back"
6363 />
64-
65- < View style = { styles . extraContentsContainer } > { extraContents } </ View >
6664 </ View >
6765 ) ;
6866}
@@ -79,9 +77,4 @@ const styles = StyleSheet.create({
7977 fontWeight : 'bold' ,
8078 margin : 10 ,
8179 } ,
82- extraContentsContainer : {
83- marginTop : 20 ,
84- flex : 1 ,
85- width : '100%' ,
86- } ,
8780} ) ;
You can’t perform that action at this time.
0 commit comments