Skip to content

Commit

Permalink
Fix constructor with deprecated context (#1822)
Browse files Browse the repository at this point in the history
The constructor with context is deprecated and occurs types error in react-native@69+.
  • Loading branch information
hyochan authored Aug 9, 2022
1 parent 34ece78 commit 8d0ae5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/elements/Shape.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ export const ownerSVGElement = {
export default class Shape<P> extends Component<P> {
[x: string]: unknown;
root: (Shape<P> & NativeMethods) | null = null;
constructor(props: P, context: {}) {
super(props, context);
constructor(props: Readonly<P> | P) {
super(props);
SvgTouchableMixin(this);
}
refMethod: (instance: (Shape<P> & NativeMethods) | null) => void = (
Expand Down

0 comments on commit 8d0ae5e

Please sign in to comment.