divanov11 / proshop_django

407 stars 430 forks source link

Clean product details when ProductScreen unmounts #9

Closed shjeong92 closed 3 years ago

shjeong92 commented 3 years ago

Hey Dennis I really enjoyed your Udemy course!

I found a minor error which is about ProductScreen component.

Here is a symptom. At the first time you click product from the HomeScreen, \<Loader \/> works just fine in ProductScreen component, but from the second times, it doesn't work anymore. If you go back and choose other items, somehow doesn't work, and it also shows previous item infos for a short time(which bothers me).

these three changes will fix the error.

Sanghyuk from Korea.

shjeong92 commented 3 years ago

PRODUCT_DETAILS_RESET should have called before the PRODUCT_DETAILS_REQUEST My first PR was wrong, but I just got it fixed and am about to remade a pull request.