Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ Component: Example, name: 'Advanced example' },
{ Component: ControlledExample, name: 'Controlled example' },
{ Component: MenuMethodsExample, name: 'Controlling menu using menu methods' },
{ Component: ExtensionExample, name: 'Extensions example' },
{ Component: ModalExample, name: 'Modal example' },
{ Component: StylingExample, name: 'Styling example' },
{ Component: TouchableExample, name: 'Touchable config example' },
{ Component: NonRootExample, name: 'Non root example' },
{ Component: CloseOnBackExample, name: 'Close on back button press example' },
{ Component: FlatListExample, name: 'Using FlatList' },
{ Component: InFlatListExample, name: 'Menu in FlatList' },
{ Component: PopoverExample, name: 'Popover renderer' },
];
// show debug messages for demos.
Menu.debug = true;
export default class Demo extends Component {
constructor(props, ctx) {
super(props, ctx);
this.state = {
selected: undefined,
};
}
render() {
if (this.state.selected) {
return ;
}
return (