You have a scoping issue in your code. things (like handeProduct) that you define inside of a closure, will not be available outside of the scope of that closure. Read more about JavaScript closures here: developer.mozilla.org/en-US/docs/W...
Hi, you're defining the function "handeProduct" inside the useEffect so it's only available inside the useEffect scope. Define the function outside the useEffect :)
Top comments (5)
Is it supposed to read as "handleProduct" or handeProduct"?
I just wanted you to be aware of the name in case there are problems later.
You have a scoping issue in your code. things (like handeProduct) that you define inside of a closure, will not be available outside of the scope of that closure. Read more about JavaScript closures here: developer.mozilla.org/en-US/docs/W...
Thank You
Hi, you're defining the function "handeProduct" inside the useEffect so it's only available inside the useEffect scope. Define the function outside the useEffect :)
Thank you