Skip to content

Commit 25f50fa

Browse files
authored
fix: React19 + Typescript fixes (#104)
* chore: avoid using deprecated global `JSX` and properly import type * fix: react 19 `implicit-ref-callback-return` typescript error
1 parent dedc041 commit 25f50fa

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ export default class RNSketchCanvas extends React.Component<
305305
</View>
306306
</View>
307307
<SketchCanvas
308-
ref={(ref) => (this._sketchCanvas = ref)}
308+
ref={(ref) => {
309+
this._sketchCanvas = ref;
310+
}}
309311
style={this.props.canvasStyle}
310312
strokeColor={
311313
this.state.color +

src/types.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { JSX } from 'react';
12
import type { StyleProp, ViewStyle } from 'react-native';
23

34
export type ImageType = 'png' | 'jpg';

0 commit comments

Comments
 (0)