-
Notifications
You must be signed in to change notification settings - Fork 10
Konjit-w3-React #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Konjit-w3-React #29
Conversation
And the link to the deployed app: https://hyf-ecommerce-w3.netlify.app/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done @konjit - app looks great and works as it should! Just a couple of small tweaks I have suggested - but nothing that is preventing the app from already working really well.
|
||
useEffect(() => { | ||
if (url) fetchData(); | ||
}, [fetchData]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add 'url' as a dependency here as well, as the fetchData function also relies on it (see line 31)
|
||
return ( | ||
|
||
<FavoritesProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the indentation here :)
|
||
useEffect(() => { | ||
setUrl(productsUrl); | ||
}, [productsUrl]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check the dependency array warning here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tkitson. Thank you for taking the time to check the code.
Uh oh!
There was an error while loading. Please reload this page.