IjzerenHein / IjzerenHein/react-navigation-shared-element

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

Open
#234 7 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the error using createSharedElementStackNavigator with the shown Stack.Screen render callback, then compare it with the component prop and createStackNavigator behavior. Trace the sourceComponent lookup from the navigator entry point; done means the callback no longer raises the reported TypeError or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.