using debugger in chrome, imagepicker
set, when try call in select() function, imagepicker
undefined.
i having same issue on other modules well, suspect it's way i'm importing or scoping issue.
my code:
import react, { component } 'react'; import { stylesheet, text, view, } 'react-native'; import button 'react-native-button'; var imagepicker = require('react-native-image-picker'); // tried also, doesn't set @ all. // import { imagepicker } 'react-native-image-picker'; export class upload extends component { constructor(props) { super(); } render() { return ( <view> <button style={styles.button} onpress={this.select.bind(this)}> upload </button> </view> ); } select() { var options = {...}; imagepicker.showimagepicker(options, (response) => { }); } }
Comments
Post a Comment