Have options as dependancy in useEffect in sharedFeatures.js without spaming API calls #658

Open
opened 2026-04-30 06:51:44 +00:00 by c24danli · 2 comments
Collaborator

At the moment we dont have options as a dependancy in the useEffect in the file sharedFeatures.js.
It can run but have errors, we need to figure out the correct way to use options and have it as a dependancy while not uppdating API calls all the time.

At the moment we dont have options as a dependancy in the useEffect in the file sharedFeatures.js. It can run but have errors, we need to figure out the correct way to use options and have it as a dependancy while not uppdating API calls all the time.
c24danli removed their assignment 2026-05-05 09:53:00 +00:00
Author
Collaborator

At the bottom of useEffect
we currently have
}, [API_URL, dependency]);
but we should have
}, [API_URL, dependency, options]);
As we use the options varible in the function.
If we just add it as is the options variable gets refreshed all the time and send api calls.
image

At the bottom of useEffect we currently have `}, [API_URL, dependency]);` but we should have `}, [API_URL, dependency, options]);` As we use the options varible in the function. If we just add it as is the options variable gets refreshed all the time and send api calls. ![image](/attachments/3503a9ab-1cfe-4ffa-b455-a08faff080a8)
Collaborator

@c24danli can we close this issue?

@c24danli can we close this issue?
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K#658
No description provided.