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
{{ message }}
This repository was archived by the owner on Feb 15, 2025. It is now read-only.
@@ -1177,38 +1181,17 @@ However, since each Observer has an instance to the Agile Instance, `useAgile()`
1177
1181
1178
1182
#### `proxyBased`
1179
1183
1180
-
If the `useAgile()` hook should wrap a [Proxy()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) around its return value/s.
1181
-
Through this Proxy, AgileTs is able to track accessed properties of the returned object/s
1182
-
and can construct a path to these.
1183
-
The paths allow AgileTs to rerender the Component more efficiently
1184
-
by only causing a rerender when an actual accessed property value mutates.
1185
-
Normally, the Component is always rerendered on a State change,
1186
-
regardless of whether the changed property value is accessed in the Component.
1187
-
This is totally fine if the value is primitive or the whole object is displayed.
1188
-
However, as soon as we display only a tiny part of the bound State value object,
Note that setting this property can destroy the useAgile type.
1253
+
-> should only be used internal!
1247
1254
1248
-
The `key/name` of the [SubscriptionContainer](packages/core/api/integration/Introduction.md#-subscriptions) that is created and added to the Observers.
1249
-
```ts
1250
-
useProxy(MY_STATE, {key: 'jeff'});
1251
-
```
1252
-
Such key can be very useful during debug sessions
1253
-
in order to analyse when which SubscriptionContainer triggered a rerender on a Component.
1254
1255
```ts
1255
-
// Agile Debug: Registered Callback/Component based Subscription 'jeff', SubscriptionContainer('jeff')
The [Agile Instance](packages/core/api/agile-instance/Introduction.md) to which the created [SubscriptionContainer](packages/core/api/integration/Introduction.md#-subscriptions) belongs to.
1269
-
However, since each Observer has an instance to the Agile Instance, `useProxy()` can automatically derive the Agile Instance from that.
1277
+
Dependencies that determine, in addition to unmounting and remounting the React-Component,
1278
+
when the specified Agile Sub Instances should be re-subscribed to the React-Component.
0 commit comments