Skip to content

Commit 98e44f7

Browse files
useSubscription: fix rules of React violations (#11863)
* Revert "Merge pull request #9707 from kazekyo/fix_usesubscription_in_strict_mode" This reverts commit 4571e1a, reversing changes made to 5be85a0. * essentially rewrite useSubscription * use `setResult` update method * adjust tests * change observable during render; lazy initialization of subscription * no more need for stable options, performance optimization * changeset * adjust documentation * review feedback * Apply suggestions from code review Co-authored-by: Jerel Miller <[email protected]> * clarify comment * update size-limits * fix test --------- Co-authored-by: Jerel Miller <[email protected]>
1 parent ffb21ce commit 98e44f7

File tree

6 files changed

+370
-356
lines changed

6 files changed

+370
-356
lines changed

.changeset/little-suits-return.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client": minor
3+
---
4+
5+
Reimplement `useSubscription` to fix rules of React violations.

.size-limits.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"dist/apollo-client.min.cjs": 39604,
2+
"dist/apollo-client.min.cjs": 39619,
33
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32852
44
}

0 commit comments

Comments
 (0)