Skip to content
JavaScript학습 기록

JavaScript project assignment MISSION 5❗ axios and infinite scroll

1 min readLearningMoved from my Tistory blogRead the Korean original

I'd like to write about what I felt while coding JavaScript project assignment MISSION 4.

Phew.. Working on this assignment, I think I spent two days doing nothing but asking myself why it wasn't working, why it wasn't working.

This assignment was to fetch data with axios for async requests, list it according to the conditions, and build the features. I hadn't used axios before, but I had used fetch, the newer syntax, in an earlier lecture, so I think that part went easily.

Next was implementing infinite scroll. The observer approach was new to me, so I learned it by searching online and following along with a YouTube lecture. Below is the YouTube lecture I used this time.

https://www.youtube.com/watch?v=Cq_UG1MHN6k

Also, infinite scroll kept firing on the initial render, so I added a check to handle that case. I think I'll only know whether this is the right way once the results come out.

Lastly, what I felt from this assignment: when you declare a function, it seems good to write only the logic that fits its name? its function name! inside the function scope, and splitting things up seems much better than cramming everything into one. A few parts still bother me after submitting all 5 assignments, but if I have to redo them I'll be more thorough, and even if not, I'll go back through my code and study it.

  • #JavaScript project assignment
  • #axios
  • #infinite scroll

More in Learning