I'm watching v5 tutorial and there is
const HomeStack = () => {
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Settings">
{(props) => <Text>Profile's settings</Text>}
</Stack.Screen>
</Stack.Navigator>;
};
but it's not working for me. I want to render <Text>Profile's settings</Text>
I get this error screenshot
What is the correct way of doing it and what is called?