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

TypeError: undefined is not an object (evaluating 'getPrototypeOf(sourceComponent)') #234

Open
LuuNguyen0811 opened this issue Apr 23, 2022 · 7 comments

Comments

@LuuNguyen0811
Copy link

LuuNguyen0811 commented Apr 23, 2022

TypeError: undefined is not an object (evaluating 'getPrototypeOf(sourceComponent)')

I get these errors when i use a render callback for the screen instead of specifying a component prop with createSharedElementStackNavigator. But when I use createStackNavigator it works.

How to fix it. Thanks

<Stack.Screen name="Home">
  {props => <HomeScreen {...props} extraData={someData} />}
</Stack.Screen>

Simulator Screen Shot - iPhone 11 - 2022-04-23 at 16 41 03

@foterio
Copy link

foterio commented Aug 1, 2022

Same problem

@csumrell
Copy link

csumrell commented Aug 9, 2022

Same issue with

<Stack.Navigator> <Stack.Screen name="Learn" component={LearnScreen} /> <Stack.Screen name="LearnDetails" component={LearnDetailsScreen} /> </Stack.Navigator>

@adibkadir
Copy link

Same problem

@adibkadir
Copy link

Did anybody solve this?

@adibkadir
Copy link

Ok... adding import { Animated } from 'react-native' solved the problem for me. Not sure why.

@RichardBrowning
Copy link

RichardBrowning commented Jan 18, 2023

Encountered the same issue. I have to use this method so that I can pass some parameters from the navigator to the screen. But it does not work. Is there any other ways to pass the parameters?

@pierroo
Copy link

pierroo commented Mar 1, 2024

did you guys manage to fix it since?
@RichardBrowning @foterio @csumrell
sorry to ping you years later, time traveling here :D

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

6 participants