Build Infinite Scroll
Talk it through out loud with your AI coach.
The problem
- hard
- Pro
A feed should load more posts as the user nears the bottom. The current version listens to every scroll event, sometimes loads the same page twice, and gets slower the longer you scroll. Explain how you'd rebuild it.
What a strong answer covers
- A cheaper way to notice that the user is near the end than watching every scroll.
- Making sure each page loads exactly once, and knowing when to stop.
- Keeping a long session from slowing the page down.
- Errors, keyboard and screen-reader users, and returning to the same place.
Common mistake: Fixing duplicate loads with a delay or debounce instead of tracking whether a load is already in progress.
Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.
Practise it out loud