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

zoomIn animation on ...navigate() and zoomOut animation on ..goBack() #26

Open
rajtejani opened this issue Sep 2, 2019 · 2 comments
Open

Comments

@rajtejani
Copy link

I want zoomIn animation on navigate() function and zoomOut animation on goBack() function in Android.How to ?

@jiangbophd
Copy link

Same one, React Navigation really not good

@iago-mendes
Copy link

I also want to do this. Currently, I have the following code (not working):

import React from 'react'
import { createStackNavigator } from '@react-navigation/stack'
import { zoomIn, zoomOut } from 'react-navigation-transitions'

interface StackProps
{
    screens: Array<{name: string, component: React.FC}>
}

const Stack: React.FC<StackProps> = ({screens}) =>
{
    const Navigator = createStackNavigator()
    return (
        <Navigator.Navigator
            headerMode='none'
            initialRouteName='Home'
            screenOptions=
            {{
                transitionSpec: {open: zoomIn(100), close: zoomOut(100)}
            }}
        >
            {screens.map(screen => (
                <Navigator.Screen
                    key={screen.name}
                    name={screen.name}
                    component={screen.component}
                />
            ))}
        </Navigator.Navigator>
    )
}

export default Stack

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