How to combine react-native-router-flux with react-native-drawer
<p>I tried to somehow connect those to examples:</p>
<p>react-native-drawer with react-native-router-flux:
following this documentation:
<a href="https://github.com/aksonov/react-native-router-flux/blob/master/docs/OTHER_INFO.md" rel="nofollow noreferrer">https://github.com/aksonov/react-native-router-flux/blob/master/docs/OTHER_INFO.md</a></p>
<p>How do I have to put the Custom Drawer in a file?</p>
<p>I always get errors, when trying to have it like this:</p>
<p>File:
components/Drawer.js</p>
<pre><code>import Drawer from 'react-native-drawer';
import ControlPanel from './ControlPanel';
import {Actions, DefaultRenderer} from 'react-native-router-flux';

export default class extends Component {
    render(){
        const state = this.props.navigationState;
        const children = state.children;
        return (
            &lt;Drawer
              ref=&quot;navigation&quot;
              open={state.open}
              onOpen={()=&gt;Actions.refresh({key:state.key, open: true})}
              onClose={()=&gt;Actions.refresh({key:state.key, open: false})}
              type=&quot;displace&quot;
              content={&lt;SideMenu /&gt;}
              tapToClose={true}
              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;
        );
    }
}
</code></pre>
<p>File: App.js</p>
<pre><code>import Drawer from './components/Drawer'
</code></pre>
<p>I get this error.</p>
<p><img src="https://i.stack.imgur.com/bgv14.png" alt="" /></p>