SoAanyip / React-FileUpload

Upload files async with xhr2 or iframe for IE. Supporting IE8+. React component.
310 stars 95 forks source link

setstate does not call render #22

Open jjkke88 opened 7 years ago

jjkke88 commented 7 years ago

when i use setstate in uploadSuccess, render() does not call

jjkke88 commented 7 years ago

i find that i should bind function to this(bind(this)) in config , for my excuse.

skyrbe commented 7 years ago

@jjkke88 : Or, you could do this uploadSuccess : (response) => { this.setState({/*whatever*/}); }

q1457797371 commented 7 years ago

i also can't setstate does not call render. who can slove this? tell me 1457797371@qq.com ...thanks

q1457797371 commented 7 years ago

uploading: function (progress) { console.log(this) let rate = progress.loaded / progress.total + '%'; this.setState({rate}) console.log('loading...', rate) }.bind(this)

i have this problem

chakson commented 6 years ago

@q1457797371 这个问题你解决了吗?