Have options as dependancy in useEffect in sharedFeatures.js without spaming API calls #658
Labels
No labels
_CRITICAL_
API
app
backEnd
Blocked, waiting for further changes
bug
cleanup
close
design
duplicate
enhancement
feature request
frontEnd
help wanted
invalid
low priority
needs input
needs review
project documentation
question
research
reviewed
script
security
SQL
style
testing
topLevel
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Andras/BoundlessFlowCampus2K#658
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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 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.
@c24danli can we close this issue?
Has been merged