From 5f5ca7c0ec7f67dc3c23bd1544638557ed264beb Mon Sep 17 00:00:00 2001 From: Daniel Cortes Date: Sun, 10 Nov 2024 00:07:29 -0700 Subject: [PATCH] Demo pointer events --- packages/mobile-app/app.json | 3 ++- packages/mobile-app/app/(tabs)/ui.tsx | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/mobile-app/app.json b/packages/mobile-app/app.json index 632b698..e59dfa4 100644 --- a/packages/mobile-app/app.json +++ b/packages/mobile-app/app.json @@ -52,7 +52,8 @@ "newArchEnabled": true } } - ] + ], + "./plugins/withPointerEvents.js" ] } } diff --git a/packages/mobile-app/app/(tabs)/ui.tsx b/packages/mobile-app/app/(tabs)/ui.tsx index b5dc4c3..701217c 100644 --- a/packages/mobile-app/app/(tabs)/ui.tsx +++ b/packages/mobile-app/app/(tabs)/ui.tsx @@ -1,8 +1,11 @@ +import { useState } from "react"; +import { Text } from "react-native"; import { Button } from "@ironfish/tackle-box"; import { Appearance, useColorScheme, View } from "react-native"; export default function UiKit() { const scheme = useColorScheme(); + const [count, setCount] = useState(0); return ( + Count: {count} + { + setCount(count + 1); + }} + style={{ height: 100, width: 100, backgroundColor: "blue" }} + /> +