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
<div class="block">Indicate whether the input should be annotated by <a href="https://arez.github.io/api/arez/annotations/Observable.html" title="class or interface in arez.annotations" class="external-link"><code>Observable</code></a>.</div>
3132
3132
</dd>
3133
+
<dt><a href="react4j/annotations/Input.html#observeOnRender()" class="member-name-link">observeOnRender()</a> - Element in annotation interface react4j.annotations.<a href="react4j/annotations/Input.html" title="annotation interface in react4j.annotations">Input</a></dt>
3134
+
<dd>
3135
+
<div class="block">Return an enum indicating whether tracked renders should observe the input value during the generated render
3136
+
prelude so that disposing the input can invalidate the render and trigger a rerender.</div>
3137
+
</dd>
3133
3138
<dt><a href="react4j/ReactNode.html#of(byte)" class="member-name-link">of(byte)</a> - Static method in interface react4j.<a href="react4j/ReactNode.html" title="interface in react4j">ReactNode</a></dt>
3134
3139
<dd> </dd>
3135
3140
<dt><a href="react4j/ReactNode.html#of(double)" class="member-name-link">of(double)</a> - Static method in interface react4j.<a href="react4j/ReactNode.html" title="interface in react4j">ReactNode</a></dt>
<spanclass="extends-implements">extends <ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Enum.html" title="class or interface in java.lang" class="external-link">Enum</a><<ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a>></span></div>
90
90
<divclass="block">Enum where the input is sourced from.</div>
<divclass="member-signature"><spanclass="modifiers">public static final</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-166">DEFAULT</a></span></div>
167
+
<divclass="member-signature"><spanclass="modifiers">public static final</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-181">DEFAULT</a></span></div>
168
168
<divclass="block">The input value is passed to the view during construction.</div>
169
169
</section>
170
170
</li>
171
171
<li>
172
172
<sectionclass="detail" id="CONTEXT">
173
173
<h3>CONTEXT</h3>
174
-
<divclass="member-signature"><spanclass="modifiers">public static final</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-170">CONTEXT</a></span></div>
174
+
<divclass="member-signature"><spanclass="modifiers">public static final</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-185">CONTEXT</a></span></div>
175
175
<divclass="block">The input value is retrieved from the react context.</div>
176
176
</section>
177
177
</li>
@@ -186,7 +186,7 @@ <h2>Method Details</h2>
186
186
<li>
187
187
<sectionclass="detail" id="values()">
188
188
<h3>values</h3>
189
-
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a>[]</span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-161">values</a></span>()</div>
189
+
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a>[]</span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-176">values</a></span>()</div>
190
190
<divclass="block">Returns an array containing the constants of this enum class, in
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-161">valueOf</a></span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div>
201
+
<divclass="member-signature"><spanclass="modifiers">public static</span> <spanclass="return-type"><ahref="Input.Source.html" title="enum class in react4j.annotations">Input.Source</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.Source.html#line-176">valueOf</a></span><wbr><spanclass="parameters">(<ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> name)</span></div>
202
202
<divclass="block">Returns the enum constant of this class with the specified name.
203
203
The string must match <i>exactly</i> an identifier used to declare an
204
204
enum constant in this class. (Extraneous whitespace characters are
Copy file name to clipboardExpand all lines: api/react4j/annotations/Input.html
+45-16Lines changed: 45 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -153,19 +153,25 @@ <h2>Optional Element Summary</h2>
153
153
<divclass="col-last even-row-color">
154
154
<divclass="block">Indicate whether the input should be annotated by <ahref="https://arez.github.io/api/arez/annotations/Observable.html" title="class or interface in arez.annotations" class="external-link"><code>Observable</code></a>.</div>
155
155
</div>
156
-
<divclass="col-first odd-row-color"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<divclass="col-first even-row-color"><code><ahref="https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<divclass="block">The setting controlling where the input value is source from.</div>
170
176
</div>
171
177
</div>
@@ -279,16 +285,12 @@ <h3>observable</h3>
279
285
<li>
280
286
<sectionclass="detail" id="disposable()">
281
287
<h3>disposable</h3>
282
-
<divclass="member-signature"><spanclass="return-type"><ahref="Feature.html" title="enum class in react4j.annotations">Feature</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.html#line-119">disposable</a></span></div>
288
+
<divclass="member-signature"><spanclass="return-type"><ahref="Feature.html" title="enum class in react4j.annotations">Feature</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.html#line-115">disposable</a></span></div>
283
289
<divclass="block">Return an enum indicating whether the view should check whether the value of the input is disposed
284
290
prior to rendering. If the value is disposed then the render method will exit early and return null.
285
291
If this parameter is set to <ahref="Feature.html#AUTODETECT"><code>Feature.AUTODETECT</code></a> then the annotation processor will inspect the
286
292
type of the input and treat it as <ahref="Feature.html#ENABLE"><code>Feature.ENABLE</code></a> if the type is annotated with the <ahref="https://arez.github.io/api/arez/annotations/ArezComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ArezComponent</code></a>
287
-
annotation or the <ahref="https://arez.github.io/api/arez/annotations/ActAsComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ActAsComponent</code></a> annotation.
288
-
289
-
<p>For tracked renders, disposable inputs whose declared type is annotated with <ahref="https://arez.github.io/api/arez/annotations/ArezComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ArezComponent</code></a> or
290
-
<ahref="https://arez.github.io/api/arez/annotations/ActAsComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ActAsComponent</code></a> will also be observed during render so that disposing the input can invalidate the
291
-
render and trigger a rerender.</p></div>
293
+
annotation or the <ahref="https://arez.github.io/api/arez/annotations/ActAsComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ActAsComponent</code></a> annotation.</div>
292
294
<dlclass="notes">
293
295
<dt>Returns:</dt>
294
296
<dd>an enum indicating whether the view should check whether the value of the input is disposed prior to rendering.</dd>
@@ -300,9 +302,36 @@ <h3>disposable</h3>
300
302
</section>
301
303
</li>
302
304
<li>
305
+
<sectionclass="detail" id="observeOnRender()">
306
+
<h3>observeOnRender</h3>
307
+
<divclass="member-signature"><spanclass="return-type"><ahref="Feature.html" title="enum class in react4j.annotations">Feature</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.html#line-134">observeOnRender</a></span></div>
308
+
<divclass="block">Return an enum indicating whether tracked renders should observe the input value during the generated render
309
+
prelude so that disposing the input can invalidate the render and trigger a rerender.
310
+
This parameter is independent of <ahref="#disposable()"><code>disposable()</code></a> and is only relevant to views with render tracking enabled.
311
+
312
+
<p>If this parameter is set to <ahref="Feature.html#AUTODETECT"><code>Feature.AUTODETECT</code></a> then the annotation processor will inspect the
313
+
type of the input and treat it as <ahref="Feature.html#ENABLE"><code>Feature.ENABLE</code></a> in the following circumstances:</p>
314
+
<ul>
315
+
<li>the type is compatible with <code>arez.component.ComponentObservable</code>.</li>
316
+
<li>the type is annotated with <ahref="https://arez.github.io/api/arez/annotations/ArezComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ArezComponent</code></a> and the <ahref="https://arez.github.io/api/arez/annotations/ArezComponent.html#observable()" title="class or interface in arez.annotations" class="external-link"><code>ArezComponent.observable()</code></a> parameter
317
+
resolves to enabled.</li>
318
+
<li>the type is annotated with <ahref="https://arez.github.io/api/arez/annotations/ActAsComponent.html" title="class or interface in arez.annotations" class="external-link"><code>ActAsComponent</code></a>. In this scenario the generated code will verify
319
+
compatibility with <code>arez.component.ComponentObservable</code> at runtime before observing the value.</li>
320
+
</ul></div>
321
+
<dlclass="notes">
322
+
<dt>Returns:</dt>
323
+
<dd>an enum indicating whether tracked renders should observe the input value during render.</dd>
324
+
</dl>
325
+
<dlclass="notes">
326
+
<dt>Default:</dt>
327
+
<dd>AUTODETECT</dd>
328
+
</dl>
329
+
</section>
330
+
</li>
331
+
<li>
303
332
<sectionclass="detail" id="dependency()">
304
333
<h3>dependency</h3>
305
-
<divclass="member-signature"><spanclass="return-type"><ahref="Feature.html" title="enum class in react4j.annotations">Feature</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.html#line-131">dependency</a></span></div>
334
+
<divclass="member-signature"><spanclass="return-type"><ahref="Feature.html" title="enum class in react4j.annotations">Feature</a></span> <spanclass="element-name"><ahref="../../src-html/react4j/annotations/Input.html#line-146">dependency</a></span></div>
306
335
<divclass="block">Return an enum indicating whether the view should be disposed if the input is disposed. To enable this feature,
307
336
the input MUST set <ahref="#immutable()"><code>immutable()</code></a> to <code>true</code>, <ahref="#disposable()"><code>disposable()</code></a> MUST resolve to
308
337
<ahref="Feature.html#ENABLE"><code>Feature.ENABLE</code></a>. The type of the input is expected to implement the <ahref="https://arez.github.io/api/arez/component/DisposeNotifier.html" title="class or interface in arez.component" class="external-link"><code>DisposeNotifier</code></a>
0 commit comments