IjzerenHein / IjzerenHein/react-navigation-shared-element
TypeError: undefined is not an object (evaluating 'getPrototypeOf(sourceComponent)')
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>

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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