title: Multiple times render in react functional component with hooks
body: <p>Actually I am not getting the right point of this problem. So seeking help.
  I have this state full functional component.
  The thing I have noticed here is that when I fetch data using useEffect hook then I get the response properly.</p>
  
  <p>The problem is, when I execute console.log("ok") in the return statement it provides output multiple times in the console. The images are added bellow:</p>
  
  <p>Here is my state and useEffect hook</p>
  
  <p><a href="https://i.stack.imgur.com/nOWFV.png" rel="noreferrer"><img src="https://i.stack.imgur.com/nOWFV.png" alt="enter image description here"></a></p>
  
  <p>And here is my return function</p>
  
  <p><a href="https://i.stack.imgur.com/miFQY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/miFQY.png" alt="enter image description here"></a></p>
  
  <p>Here is the console output I get on each time I browse the page.
  <a href="https://i.stack.imgur.com/kDj8X.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kDj8X.png" alt="enter image description here"></a></p>
  
  <p>Why the console.log("ok") is executing multiple times?</p>