Skip to content
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

The product reducer and action: keeps loading the URL {product/api/product/:id} resulting in the product screen failing any idea what's causing this ??? #165

Closed
Masemola-NK opened this issue Jul 10, 2021 · 2 comments

Comments

@Masemola-NK
Copy link

The product reducer and action: keeps loading the URL {product/api/product/:id} resulting in the product screen failing any idea what's causing this ???

Originally posted by @Masemola-NK in #88 (comment)

@talhabintariq
Copy link

@Masemola-NK I haven't seen the final code but it sounds like the action is being called again and again. That can be fixed by updating the dependencies in the useEffect.

@basir
Copy link
Collaborator

basir commented Jul 19, 2021

hello there,
ask it in Udemy Q/A and mention screenshot of error and source code. the issue is in useEffect. please compare your code with this file:
https://github.com/bradtraversy/proshop_mern/blob/master/frontend/src/screens/ProductScreen.js

@basir basir closed this as completed Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants