I have a price counter component. When I try to decrease a product qty to 0 it is deleted successfully but it affects the following product's qty and gives it 0
If I want to call API after the first rendering of component, I know we have useEffect hook to call the API method. (I am talking about functional components on
My question is what does it change to declare a constant above or bellow a React functional component (or a class component also) ? for example what is the diff