With the official documentation of React : https://en.reactjs.org/docs/react-component.html#setstate
setState() does not always immediately update the component. It may
batch or defer the update until later. This makes reading this.state
right after calling setState() a potential pitfall. Instead, use
componentDidUpdate or a setState callback (setState(updater,
callback)), either of which are guaranteed to fire after the update
has been applied. If you need to set the state based on the previous
state, read about the updater argument below.
You must use function callback here :
setState(stateChange[, callback])
Example :
setState({file: [file]}, () => { console.log(this.state.file) });
Moreover, if you want to debug and watch the state and prop of component. I recommend you using React Developer Tool. It help so much easier https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi