0

I am developing a react native app. In that app, I am trying to use an NPM package called

createAnimatedSwitchNavigator

But when I try to run the program I am getting the following error

undefined is not a function (evaluating '(0 _reactNavigationAnimatedSwitch.createAnimatedSwitchNavigator)')

Below is my code

NB:- the normal SwitchNavigator is working fine with this code

            import {createAnimatedSwitchNavigator,
                createAppContainer} from 'react-navigation-animated-switch';

            import Login   from "./Login/Login";
            import SignUp  from './SignUp/SignUp';

            const Navigate = createAnimatedSwitchNavigator({
            Login:         {screen:Login},
            SignUp:        {screen:SignUp},
            },
            )

            export const AppContainer = createAppContainer(Navigate)
Savad
  • 1,240
  • 3
  • 21
  • 50

1 Answers1

0

I fixed it using the following method

import createAnimatedSwitchNavigator from 'react-navigation-animated-switch';
import {createAppContainer } from 'react-navigation';
Savad
  • 1,240
  • 3
  • 21
  • 50