-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Trying to render an application with some initialData, which triggers some async calls.
if (query.state.data) {
query.scheduleStaleTimeout(); // Simulate a query healing process
query.heal(); // Schedule for garbage collection in case
// nothing subscribes to this query
query.scheduleGarbageCollection();
}The scheduleStaleTimeout() and scheduleGarbageCollection() can be prevented from running by setting stale and cache to Infinity, but heal() will always call a clearTimeout function.
In our server environment calling setTimeout or clearTimeout throws an error.
The fix is to add the isServer check to the if statement - I'm just not sure if there's any consequences to doing this? Does the server actually need to call any of these methods?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels