From 7402bcfa967a02ba462c18fcdfb604e8dc613814 Mon Sep 17 00:00:00 2001 From: Ian Y Date: Wed, 28 May 2025 08:50:50 +0800 Subject: [PATCH 1/2] chore: avoid using deprecated global `JSX` and properly import type --- src/types.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types.tsx b/src/types.tsx index de1e3dd0..4460e6a5 100644 --- a/src/types.tsx +++ b/src/types.tsx @@ -1,3 +1,4 @@ +import type { JSX } from 'react'; import type { StyleProp, ViewStyle } from 'react-native'; export type ImageType = 'png' | 'jpg'; From 582480636463db882e7a2e9121e501c2a3b40f49 Mon Sep 17 00:00:00 2001 From: Ian Y Date: Wed, 28 May 2025 09:01:28 +0800 Subject: [PATCH 2/2] fix: react 19 `implicit-ref-callback-return` typescript error --- src/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index 956da454..8e3905f4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -305,7 +305,9 @@ export default class RNSketchCanvas extends React.Component< (this._sketchCanvas = ref)} + ref={(ref) => { + this._sketchCanvas = ref; + }} style={this.props.canvasStyle} strokeColor={ this.state.color +