title: react native flux auto close side menu drawer when click menu to another scene
body: <p>can someone help me how to close sidemenu react native flux when i clicked menu to another scene?</p>
  
  <p>i have try, but still cant close</p>
  
  <p>here my drawerlayout.js code</p>
  
  <pre><code>import React, { Component } from 'react';
  import Drawer from 'react-native-drawer';
  import SideMenu from './SideMenu';
  import {Actions, DefaultRenderer} from 'react-native-router-flux';
  
  export default class NavigationDrawer extends Component {
  
  
  
  render(){
      const state = this.props.navigationState;
      const children = state.children;
      return (
          &lt;Drawer
              ref="navigation"
              open={state.open}
              onOpen={()=&gt;Actions.refresh({key:state.key, open: true})}
              onClose={()=&gt;Actions.refresh({key:state.key, open: false})}
              type="static"
              content={&lt;SideMenu /&gt;}
              tapToClose={true}
              /*captureGestures={true}*/
              /*panOpenMask={0.02}*/
              openDrawerOffset={0.2}
              panCloseMask={0.2}
              negotiatePan={true}
              tweenHandler={(ratio) =&gt; ({
                  main: { opacity:Math.max(0.54,1-ratio) }
              })}&gt;
              &lt;DefaultRenderer navigationState={children[0]} onNavigate={this.props.onNavigate} /&gt;
          &lt;/Drawer&gt;
  
      );
      Actions.refresh({key: 'drawer', open: value =&gt; !value });
  
  }
  
  }
  </code></pre>
  
  <p>and sidemenu.js code</p>
  
  <pre><code>import React, { Component } from 'react';
  import {
  View,
  Text, Button, TouchableHighlight
  } from 'react-native';
  
  import { Router, Scene, Actions } from 'react-native-router-flux';
  export default class SlideMenu extends Component {
  render() {
      return (
          &lt;View&gt;
              &lt;Button onPress={()=&gt;Actions.login()} title={"hhhhhhhh"}&gt;
                  Menu
              &lt;/Button&gt;
          &lt;/View&gt;
      )
  
  }
  }
  </code></pre>
  
  <p>and here my router (App.js)
             /**
        * Sample React Native App
        * <a href="https://github.com/facebook/react-native" rel="nofollow noreferrer">https://github.com/facebook/react-native</a>
        * @flow
        */</p>
  
  <pre><code>import React, { Component } from 'react';
  import {
  AppRegistry,
  StyleSheet,
  Text,
  View
  } from 'react-native';
  import { Router, Scene, Actions } from 'react-native-router-flux';
   import Home from './Scene/Home';
  import Login from './Scene/Login';
  import Register from './Scene/Register';
  import DrawerLayout from './Component/DrawerLayout';
  export default class Flux extends Component {
  render() {
  
      return (
          &lt;Router&gt;
              &lt;Scene key="drawer" component={DrawerLayout} open={false}&gt;
                  &lt;Scene key="Main" tabs={false}&gt;
                      &lt;Scene key="home" component={Home} title="Home"  initial={true} /&gt;
                      &lt;Scene key="login" component={Login} title="Login" /&gt;
                      &lt;Scene key="register" component={Register}  title="Register" /&gt;
                  &lt;/Scene&gt;
              &lt;/Scene&gt;
          &lt;/Router&gt;
      );
  }
  
  }
  
  const styles = StyleSheet.create({
  container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#F5FCFF',
  },
  welcome: {
      fontSize: 20,
      textAlign: 'center',
      margin: 10,
  },
  instructions: {
      textAlign: 'center',
      color: '#333333',
      marginBottom: 5,
      },
  });
  
  AppRegistry.registerComponent('Flux', () =&gt; Flux);
  </code></pre>