Skip to content

Conversation

AliQassab
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Problem:
Clicking on hashtags caused an infinite loop of API requests, making the browser sluggish and overwhelming the server with dozens of repeated requests.

Root Cause:
State-change events were triggering handleRouteChange() → hashtagView() → getBloomsByHashtag() → state update → repeat infinitely.

Solution:
Added a simple check to only fetch hashtag data if it's not already loaded for the current hashtag.

Questions

The Bug report should be:

  • Hashtag navigation causes infinite API requests and browser slowdown
  • When clicking on hashtags, the application makes dozens of repeated API requests causing severe browser performance issues and potential server overload.

@AliQassab AliQassab added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 15, 2025
- Only fetch hashtag data once to prevent repeated API calls
- Fixes infinite state-change event loop
- Resolves browser performance issues

Fixes CodeYourFuture#3
@AliQassab AliQassab force-pushed the bug/Hashtag-slowing-down-the-browser branch from 17397dd to 1d03200 Compare October 16, 2025 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant