Skip to content

Commit

Permalink
Remove deprecated defaultProps
Browse files Browse the repository at this point in the history
  • Loading branch information
juliesaia-vendora authored Nov 21, 2024
1 parent 8c5d768 commit af04e86
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions packages/react-native-external-display/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,21 @@ type Props = {
onScreenDisconnect?: Function,

Check failure on line 31 in packages/react-native-external-display/index.js

View workflow job for this annotation

GitHub Actions / lint

propType "onScreenDisconnect" is not required, but has no corresponding defaultProps declaration
}

const ExternalDisplayView = (props: Props) => {
const {
screen,
fallbackInMainScreen,
mainScreenStyle,
style,
const ExternalDisplayView = ({
style = undefined,
mainScreenStyle = undefined,
screen = '',
fallbackInMainScreen = false,
onScreenConnect = () => {},
onScreenChange = () => {},
onScreenDisconnect = () => {},
...nativeProps
}: Props) => {
const screens = useExternalDisplay({
onScreenConnect,
onScreenChange,
onScreenDisconnect,
...nativeProps
} = props
const screens = useExternalDisplay(props)
})
const scr = screens[screen]
if (!scr && !fallbackInMainScreen) {
return null
Expand All @@ -68,16 +71,6 @@ const ExternalDisplayView = (props: Props) => {
)
}

ExternalDisplayView.defaultProps = {
style: undefined,
mainScreenStyle: undefined,
screen: '',
fallbackInMainScreen: false,
onScreenConnect: () => {},
onScreenChange: () => {},
onScreenDisconnect: () => {},
}

export { getScreens, useExternalDisplay, SceneManager }

export default ExternalDisplayView

0 comments on commit af04e86

Please sign in to comment.