I am new to react native , And I want to redirect My Drawer Function by navigation. means When navigate to that screen . that drawer function will automatically call.
here is my code of navigation in Browse.js file
if (json != "error") {
// if (response && response.length && response[0].message != "error")
alert(JSON.stringify(json));
this.props.navigation.navigate("Settings", {
data: json.title,
and here is my Drawer function in Setting.js file
export default function App() {
return (
<NavigationContainer>
<Drawer.Navigator>
<Drawer.Screen
name="User Name"
options={{
drawerIcon: ({ focused, size }) => (
<AntDesign name="user" size={24} color="black" />
),
}}
component={NotificationsScreen}
/>
Just Tell me what should I write instead of this line
this.props.navigation.navigate("Settings", {
data: json.title,