Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
if (screensEnabled?.()) {
const { isVisible, ...rest } = this.props;
// @ts-ignore
return ;
}
const { isVisible, children, style, ...rest } = this.props;
return (
render() {
if (screensEnabled?.()) {
const { isVisible, ...rest } = this.props;
// @ts-ignore
return ;
}
const { isVisible, children, style, ...rest } = this.props;
return (
const MaybeScreen = ({
enabled,
active,
...rest
}: ViewProps & {
enabled: boolean;
active: number | Animated.Node;
children: React.ReactNode;
}) => {
if (Platform.OS !== 'ios' && enabled && Screens.screensEnabled()) {
AnimatedScreen =
AnimatedScreen || Animated.createAnimatedComponent(Screens.NativeScreen);
return ;
}
return
function NativeStackNavigator(props: NativeStackNavigatorProps) {
if (!screensEnabled()) {
throw new Error(
'Native stack is only available if React Native Screens is enabled.'
);
}
const { initialRouteName, children, screenOptions, ...rest } = props;
const { state, descriptors, navigation } = useNavigationBuilder<
StackNavigationState,
StackRouterOptions,
NativeStackNavigationOptions,
{}
>(StackRouter, {
initialRouteName,
children,
screenOptions,
});
const MaybeScreen = ({
enabled,
active,
...rest
}: ViewProps & {
enabled: boolean;
active: number | Animated.Node;
children: React.ReactNode;
}) => {
if (Platform.OS !== 'ios' && enabled && Screens.screensEnabled()) {
AnimatedScreen =
AnimatedScreen || Animated.createAnimatedComponent(Screens.NativeScreen);
return ;
}
return