alexmanzo / movie-search-vuejs

Live Site
http://movie-search-vue.alexmanzo.me
1 stars 0 forks source link

API-requests loop after searching for a movie #1

Closed fidelisrafael closed 5 years ago

fidelisrafael commented 5 years ago

Hey there, how it's going?

I just stumbled in this project of yours, and during my tests, I found out that after searching for a movie, the application keeps an open loop which sends numerous requests to the "MovieDB API" until it gets limited by the rate limit on the API side.

movie-search-vue-search

This a nice project, I am too sleepy right now to send a PR, so that's why I am opening a issue.

fidelisrafael commented 5 years ago

I am not sure, but maybe the problem is here.

Perhaps this beforeUpdate method is called in every DOM rendering?(And sometimes tons of renders can happen in a few ms). I never worked with Vue.js so I'm not sure, just trying to figure it out looking at the code.

alexmanzo commented 5 years ago

Hey! Thanks for pointing this out. For whatever reason, I didn't see it until now. That was a problem I ran into during development and thought I had squashed it, but I'll jump back in and have a look!