Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module '"@shopify/react-native-skia"' has no exported member 'useTouchHandler'. #2975

Closed
1 task
proparnaampit opened this issue Feb 24, 2025 · 2 comments
Closed
1 task
Labels
bug Something isn't working

Comments

@proparnaampit
Copy link

Description

import {
Canvas,
Path,
SkPath,
Skia,
TouchInfo,
useTouchHandler,
Image as SkiaImage,
useImage,
BlendMode,
PaintStyle,
Paint,
} from '@shopify/react-native-skia';

previously this useTouchHandler and TouchInfo was working but suddenly it is showing Module '"@shopify/react-native-skia"' has no exported member 'useTouchHandler'.Module '"@shopify/react-native-skia"' has no exported member 'TouchInfo'.

the version I was using is "@shopify/react-native-skia": "^1.3.11",

what was the issue? I didn't even changed the version.

React Native Skia Version

1.3.11

React Native Version

0.74.1

Using New Architecture

  • Enabled

Steps to Reproduce

import {
Canvas,
Path,
SkPath,
Skia,
TouchInfo,
useTouchHandler,
Image as SkiaImage,
useImage,
BlendMode,
PaintStyle,
Paint,
} from '@shopify/react-native-skia';

const touchHandler = useTouchHandler(
{
onActive: onDrawingActive,
onStart: onDrawingStart,
},
[onDrawingActive, onDrawingStart],
);



{paths.map((p, index) => (

))}

both showing

Type '{ children: (Element | Element[])[]; style: { width: "100%"; height: "100%"; }; ref: RefObject; onTouch: any; }' is not assignable to type 'IntrinsicAttributes & CanvasProps & RefAttributes'.
Property 'onTouch' does not exist on type 'IntrinsicAttributes & CanvasProps & RefAttributes'.

Snack, Code Example, Screenshot, or Link to Repository

import {
Canvas,
Path,
SkPath,
Skia,
TouchInfo,
useTouchHandler,
Image as SkiaImage,
useImage,
BlendMode,
PaintStyle,
Paint,
} from '@shopify/react-native-skia';

const touchHandler = useTouchHandler(
{
onActive: onDrawingActive,
onStart: onDrawingStart,
},
[onDrawingActive, onDrawingStart],
);



{paths.map((p, index) => (

))}

both showing

Type '{ children: (Element | Element[])[]; style: { width: "100%"; height: "100%"; }; ref: RefObject; onTouch: any; }' is not assignable to type 'IntrinsicAttributes & CanvasProps & RefAttributes'.
Property 'onTouch' does not exist on type 'IntrinsicAttributes & CanvasProps & RefAttributes'.

@proparnaampit proparnaampit added the bug Something isn't working label Feb 24, 2025
@wcandillon
Copy link
Contributor

wcandillon commented Feb 24, 2025 via email

@wcandillon
Copy link
Contributor

I'm closing this for now but please let us know if you have any questions, here is a tutorial on how to use advanced gestures: https://www.youtube.com/watch?v=5yM4NPcTwY4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants