I have created a simple promise and when I call then on it, the promise is running twice.
import React from 'react'
function App() {
let promise = new Promise(function (resolve, reject) {
resolve("hello")
})
promise.then(function (res) {
console.log(res)
})
return (
<>
Hello
</>
)
}
export default App
When I visit localhost:3000, and open debugger it shows "hello" printed twice. I am not able to understand what is going on. Please help