Skip to content

Commit

Permalink
fix: Fixed dynamic imports of react-native-web (#348)
Browse files Browse the repository at this point in the history
Co-authored-by: max <max@email.com>
  • Loading branch information
maximilize and Maxs555 authored Nov 18, 2021
1 parent 06d6b37 commit 7b49e83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/Picker.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import * as React from 'react';
import * as ReactNativeWeb from 'react-native-web';
import {forwardRef, useRef} from 'react';
import type {ViewProps} from 'react-native-web/src/exports/View/types';
import type {GenericStyleProp} from 'react-native-web/src/types';
Expand All @@ -30,8 +31,7 @@ type PickerProps = {
};

const createElement =
require('react-native-web').createElement ||
require('react-native-web').unstable_createElement;
ReactNativeWeb.createElement || ReactNativeWeb.unstable_createElement;

const Select = forwardRef((props: any, forwardedRef) =>
createElement('select', props),
Expand Down
4 changes: 2 additions & 2 deletions js/PickerItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import type {ColorValue} from 'react-native/Libraries/StyleSheet/StyleSheet';

import * as React from 'react';
import * as ReactNativeWeb from 'react-native-web';

type Props = {
color?: ColorValue,
Expand All @@ -18,8 +19,7 @@ type Props = {
};

const createElement =
require('react-native-web').createElement ||
require('react-native-web').unstable_createElement;
ReactNativeWeb.createElement || ReactNativeWeb.unstable_createElement;

const Option = (props: any) => createElement('option', props);

Expand Down

0 comments on commit 7b49e83

Please sign in to comment.