Why is `Promise.then` called twice in a React component but not the console.log? Why is `Promise.then` called twice in a React component but not the console.log? reactjs reactjs