Skip to content

Commit

Permalink
fix(web): Allow createElement & unstable_createElement usage (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek authored and msand committed Jan 15, 2020
1 parent c2c524a commit 7a23968
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/ReactNativeSVG.web.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
// @ts-ignore
import * as React from 'react';
import { createElement, GestureResponderEvent } from 'react-native';
import { GestureResponderEvent } from 'react-native';
import { NumberArray, NumberProp } from './lib/extract/types';
import SvgTouchableMixin from './lib/SvgTouchableMixin';
import { resolve } from './lib/resolve';

const createElement: <P>(
type: React.ReactType,
props?: P,
...children: React.ReactNode[]
) => React.ReactElement<P> =
require('react-native').unstable_createElement ||
require('react-native').createElement;

type BlurEvent = Object;
type FocusEvent = Object;
type PressEvent = Object;
Expand Down

0 comments on commit 7a23968

Please sign in to comment.