Skip to content

Commit

Permalink
BREAKING CHANGE: remove createElement usage in react-native-web (reac…
Browse files Browse the repository at this point in the history
  • Loading branch information
listiani13 authored Jan 8, 2022
1 parent 8271330 commit 64d0603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions js/Picker.web.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ type PickerProps = {
prompt?: string,
};

const createElement =
ReactNativeWeb.createElement || ReactNativeWeb.unstable_createElement;

const Select = forwardRef((props: any, forwardedRef) =>
createElement('select', props),
ReactNativeWeb.unstable_createElement('select', props),
);

const Picker: React$AbstractComponent<PickerProps, empty> = forwardRef<
Expand Down
6 changes: 2 additions & 4 deletions js/PickerItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ type Props = {
value?: number | string,
};

const createElement =
ReactNativeWeb.createElement || ReactNativeWeb.unstable_createElement;

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

/**
* PickerItem Component for React Native Web
Expand Down

0 comments on commit 64d0603

Please sign in to comment.