react-native-local-image-manager icon indicating copy to clipboard operation
react-native-local-image-manager copied to clipboard

setState problem

Open montosajo opened this issue 8 years ago • 0 comments

Hi,I wrote a piece of code using 'new' ES6 approach ,so when I want to ....// excerpt ipip is a state max = 22;// number of files to download LocalImageManager.download(options, function (results) {

        console.log(results)
        var n = results.indexOf(max+"Zxm");
        if (n > 0){
           alert ( "gemacht")
           this.setState({ ipip: results });

        }

    })

... I find this.setState is not a function .

That is logical as the code is not a RN class so I dont have a valid this and of course I dont have setState. Any help appreciated

R Giorgio

montosajo avatar Jan 03 '17 01:01 montosajo