ReactNavigation Stack Navigator has the property HeaderRight useful to place the menu button in the header, but has not a context menu.
Is it possible to integrate the React Native Popup Menu in the Stack Navigator?
Thanks in advance.
It is definitely possible to accomplish. In your root App do the following:
import React, { Component } from 'react';
import { MenuContext } from 'react-native-popup-menu';
import MainNavigator from './components/MainNavigator';
export default class App extends Component {
render() {
return (
<MenuContext>
<MainNavigator />
</MenuContext>
);
}
}
Then the way you've implemented your headerRight
should work perfectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With