You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to work great when working against valid URLs with responses; however, currently issuing infinite URL retries when the content is invalid or fails to load.
We tried to prevent this by keeping startTime as a state variable in the hook itself, which when checked with requestOnce helps ensure that only one request is sent; sadly it seems (I'm still learning hook-foo) that startTime isn't getting set properly, or the hook is otherwise dying/aborting and the component is remounting every time.
The first proposed solution is to figure out how to not-reload-the-hook upon fetch() failures; If we can't figure out how to not-reload-the-hook, the next step is probably to create a global const HTTPRequest = React.createContext() and share global state across all the hooks to make sure we're being nice to external services.
The text was updated successfully, but these errors were encountered:
Seems to work great when working against valid URLs with responses; however, currently issuing infinite URL retries when the content is invalid or fails to load.
We tried to prevent this by keeping
startTime
as a state variable in the hook itself, which when checked withrequestOnce
helps ensure that only one request is sent; sadly it seems (I'm still learning hook-foo) thatstartTime
isn't getting set properly, or the hook is otherwise dying/aborting and the component is remounting every time.The first proposed solution is to figure out how to not-reload-the-hook upon
fetch()
failures; If we can't figure out how to not-reload-the-hook, the next step is probably to create a globalconst HTTPRequest = React.createContext()
and share global state across all the hooks to make sure we're being nice to external services.The text was updated successfully, but these errors were encountered: