@suspensive/react-query-4 2.18.7 → 2.18.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@suspensive/react-query-4",
3
- "version": "2.18.7",
3
+ "version": "2.18.9",
4
4
  "description": "Suspensive interfaces for @tanstack/react-query@4",
5
5
  "keywords": [
6
6
  "suspensive",
@@ -43,12 +43,12 @@
43
43
  "@types/react": "^18.3.12",
44
44
  "react": "^18.3.1",
45
45
  "@suspensive/eslint-config": "0.0.0",
46
- "@suspensive/react": "2.18.7",
46
+ "@suspensive/react": "2.18.9",
47
47
  "@suspensive/tsconfig": "0.0.0-development",
48
48
  "@suspensive/tsup": "0.0.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@suspensive/react": "^2.18.7",
51
+ "@suspensive/react": "^2.18.9",
52
52
  "@tanstack/react-query": "^4",
53
53
  "react": "^18"
54
54
  },
@@ -15,7 +15,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
15
15
  //@ts-expect-error no suspense
16
16
  suspense={boolean}
17
17
  >
18
- {(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
18
+ {(query) => (
19
+ <>
20
+ {query.data.pages
21
+ .filter(({ text }) => text)
22
+ .map((item, index) => (
23
+ <div key={index}>{item.text}</div>
24
+ ))}
25
+ </>
26
+ )}
19
27
  </SuspenseInfiniteQuery>
20
28
  ))()
21
29
  ;(() => (
@@ -25,7 +33,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
25
33
  //@ts-expect-error no useErrorBoundary
26
34
  useErrorBoundary={boolean}
27
35
  >
28
- {(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
36
+ {(query) => (
37
+ <>
38
+ {query.data.pages
39
+ .filter(({ text }) => text)
40
+ .map((item, index) => (
41
+ <div key={index}>{item.text}</div>
42
+ ))}
43
+ </>
44
+ )}
29
45
  </SuspenseInfiniteQuery>
30
46
  ))()
31
47
  ;(() => (
@@ -35,7 +51,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
35
51
  //@ts-expect-error no enabled
36
52
  enabled={boolean}
37
53
  >
38
- {(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
54
+ {(query) => (
55
+ <>
56
+ {query.data.pages
57
+ .filter(({ text }) => text)
58
+ .map((item, index) => (
59
+ <div key={index}>{item.text}</div>
60
+ ))}
61
+ </>
62
+ )}
39
63
  </SuspenseInfiniteQuery>
40
64
  ))()
41
65
  ;(() => (
@@ -45,7 +69,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
45
69
  //@ts-expect-error no placeholderData
46
70
  placeholderData="placeholder"
47
71
  >
48
- {(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
72
+ {(query) => (
73
+ <>
74
+ {query.data.pages
75
+ .filter(({ text }) => text)
76
+ .map((item, index) => (
77
+ <div key={index}>{item.text}</div>
78
+ ))}
79
+ </>
80
+ )}
49
81
  </SuspenseInfiniteQuery>
50
82
  ))()
51
83
  ;(() => (
@@ -55,7 +87,15 @@ describe('<SuspenseInfiniteQuery/>', () => {
55
87
  //@ts-expect-error no placeholderData
56
88
  placeholderData="placeholder"
57
89
  >
58
- {(query) => <>{query.data.pages.filter(({ text }) => text)}</>}
90
+ {(query) => (
91
+ <>
92
+ {query.data.pages
93
+ .filter(({ text }) => text)
94
+ .map((item, index) => (
95
+ <div key={index}>{item.text}</div>
96
+ ))}
97
+ </>
98
+ )}
59
99
  </SuspenseInfiniteQuery>
60
100
  ))()
61
101
  ;(() => (