Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

React Native - Step-by-step functional example for side menu

$
0
0

I am trying to add a side menu to my react-native application using react-native-navigation. The goal is to have a hamburger menu that when activated shows the side menu. I searched the official component documentation https://wix.github.io/react-native-navigation/docs/sideMenu/, but the information was not enough. Can someone help me by showing a practical step-by-step how to set up this side menu and when clicking on the options, rederize the desired screen?

my index.js

import { Navigation } from "react-native-navigation";import Login from './src/screen/Login';import Main from './src/screen/Main';import UserAccount from './src/screen/UserAccount';Navigation.registerComponent('Login', () => Login);Navigation.registerComponent('Main', () => Main);Navigation.registerComponent('UserAccount', () => UserAccount);Navigation.setDefaultOptions({    topBar: {        leftButtons: {            id: 'sideMenu',            icon: require('./resource/img/menuIcon.png')        },        title: {            alignment: 'left'        }    }});Navigation.events().registerAppLaunchedListener(async () => {   //code for the side menu});

Viewing all articles
Browse latest Browse all 16750

Trending Articles