侧边栏,支持左、右
导入:
npm install react-native-side-menu --save
使用同样简单,查看github即可,下面贴一下简单使用的代码
既然是侧栏,肯定有一个当前页,有一个侧栏页
当前页:
/**
* Created by mymac on 2017/4/21.
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
TouchableOpacity,
Dimensions
} from 'react-native';
let {width,height} = Dimensions.get('window');
//npm install react-native-side-menu --save
//https://github.com/react-native-community/react-native-side-menu
import SideMenu from 'react-native-side-menu'
import Menu from './LeftMenu'
export default class LeftSideMenu extends Component {
constructor(props){
super(props);
<