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
Defined in: [components/Navigation.tsx:23](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/components/Navigation.tsx#L23)
9
+
Defined in: [components/Navigation.tsx:23](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/components/Navigation.tsx#L23)
10
10
11
11
***
12
12
@@ -16,4 +16,4 @@ Defined in: [components/Navigation.tsx:23](https://github.com/thoughtbot/supergl
Defined in: [components/Navigation.tsx:47](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/components/Navigation.tsx#L47)
19
+
Defined in: [components/Navigation.tsx:47](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/components/Navigation.tsx#L47)
Defined in: [hooks/index.ts:10](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/index.ts#L10)
9
+
Defined in: [hooks/index.ts:10](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/index.ts#L10)
10
10
11
11
A lightweight hook that grabs the superglue state from the store.
Copy file name to clipboardExpand all lines: docs/reference/hooks.useContent.md
+26-6Lines changed: 26 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,32 @@
1
1
## Type Aliases
2
2
3
+
<aid="fragmentproxy"></a>
4
+
5
+
### FragmentProxy
6
+
7
+
> **FragmentProxy** = \{`__fragment`: `true`; \}
8
+
9
+
Defined in: [hooks/useContent.tsx:13](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L13)
10
+
11
+
#### Properties
12
+
13
+
<aid="__fragment"></a>
14
+
15
+
##### \_\_fragment
16
+
17
+
> **\_\_fragment**: `true`
18
+
19
+
Defined in: [hooks/useContent.tsx:13](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L13)
Defined in: [hooks/useContent.tsx:17](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/useContent.tsx#L17)
29
+
Defined in: [hooks/useContent.tsx:18](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L18)
10
30
11
31
A proxy type that enables reactive access to nested content with automatic fragment resolution
12
32
@@ -24,7 +44,7 @@ A proxy type that enables reactive access to nested content with automatic fragm
Defined in: [hooks/useContent.tsx:33](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/useContent.tsx#L33)
47
+
Defined in: [hooks/useContent.tsx:32](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L32)
28
48
29
49
Union type for fragment references, accepting either FragmentRef objects or string IDs
30
50
@@ -38,7 +58,7 @@ Union type for fragment references, accepting either FragmentRef objects or stri
Defined in: [hooks/useContent.tsx:79](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/useContent.tsx#L79)
61
+
Defined in: [hooks/useContent.tsx:78](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L78)
42
62
43
63
Returns a proxy for accessing your page's content e.g, `index.json.props`,
Defined in: [hooks/useContent.tsx:109](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/useContent.tsx#L109)
120
+
Defined in: [hooks/useContent.tsx:108](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L108)
101
121
102
122
Passing in a fragment to useContent allows us to scope the tracking of
103
123
fragments to that hook usage. Its useful in performance scenarios where you
@@ -147,7 +167,7 @@ SlidingCart will update only if the fragment referenced by `cartRef` updates.
Defined in: [hooks/useContent.tsx:173](https://github.com/thoughtbot/superglue/blob/46e766e2cea01dff2e2730d3b74a6719c2b2fe9f/superglue/lib/hooks/useContent.tsx#L173)
170
+
Defined in: [hooks/useContent.tsx:172](https://github.com/thoughtbot/superglue/blob/6828bbda8f8692c93cd2c69d86a8a10fbb351d20/superglue/lib/hooks/useContent.tsx#L172)
151
171
152
172
Extracts the underlying state from an [useContent](#usecontent) proxy
0 commit comments