Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing FullWindowOverlay is only valid on iOS devices. #35

Open
fax1ty opened this issue Oct 30, 2022 · 2 comments
Open

Importing FullWindowOverlay is only valid on iOS devices. #35

fax1ty opened this issue Oct 30, 2022 · 2 comments

Comments

@fax1ty
Copy link

fax1ty commented Oct 30, 2022

No description provided.

@AronBe
Copy link

AronBe commented Feb 28, 2023

you can just create a wrapper if the overlay is crashing your app on Android

import { FullWindowOverlay } from 'react-native-screens'

import { isIOS } from '~/constants/platform'

export const AppFullWindowOverlay = ({ children }: { children: React.ReactNode }) =>
  isIOS ? <FullWindowOverlay>{children}</FullWindowOverlay> : <>{children}</>

@duncannz
Copy link

My question would be why the warning is logged when importing FullWindowOverlay, rather than when rendering it. I am already using a ternary for rendering it as posted above, but the warning for importing it doesn't make sense to me, as I can't think of any way to only import the component on iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants