This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 786
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent new data re-render attempts during an existing render (#3902)
* Dependency updates * Use more precise new data callback naming; add a small SSR helper This commit includes a few small `QueryData` adjustments: - Replace the `forceUpdate` callback property name with `onNewData`, to make its use more clear. - Create a small public "has SSR started" helper utility that can be used by things like the `useQuery` hook to change its behavior depending on how it's being used. * Prevent new data re-render attempts during an existing render As of version 16.13.0, React logs a warning when a function component is updated during another component's render phase (facebook/react#17099). In React Apollo, this warning can be triggered when nesting multiple components that leverage `useQuery`. To help avoid this, this commit ensures re-render requests to show new data are delayed until an effect hook is run to handle them (since we're then out of the render phase). * Update react types and `useReducer` calls to skip initial value The latest `useReducer` API doesn't require an initial value. * Changelog update * Bundlesize increase * Code review tweaks * Remove 3.1.4 date
- Loading branch information
Showing
13 changed files
with
11,661 additions
and
7,664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,6 @@ | |
}, | ||
"devDependencies": { | ||
"rollup": "1.23.1", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -54,6 +54,6 @@ | |
"jest": "24.9.0", | ||
"rollup": "1.23.1", | ||
"tsc-watch": "3.0.2", | ||
"typescript": "3.6.4" | ||
"typescript": "3.8.3" | ||
} | ||
} |