I have a leaderboard which calls a component and passes it data to it like so:
_renderItem =({item}) => (
For some reason if you don't want to use withNavigation, the following solution works too. You just have to pass navigation as a prop to your child component.
For example:
export default class ParentComponent extends React.Component {
render() {
return (
);
}
}
And in child component:
const ChildComponent = (props) => {
return (
props.navigation.navigate('Wherever you want to navigate')}
/>
);
};
export default ChildComponent;