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
Content rendered when `when` is truthy. Function children receive an accessor or value based on `keyed`.
72
+
Content rendered when `when` is truthy.
73
73
74
74
## Return value
75
75
76
76
-**Type:**`JSX.Element`
77
77
78
+
Returns the rendered children or `fallback` content.
79
+
78
80
## Behavior
79
81
80
-
- With `keyed` omitted or `false`, `<Show>`re-renders only when the truthiness of `when` changes.
81
-
- With `keyed={true}`, changes to the `when` value itself trigger a new render even when the value remains truthy.
82
+
- With `keyed` omitted or `false`, `<Show>`updates only when the truthiness of `when` changes. Replacing one truthy value with another truthy value does not recreate the child block, and function children receive an accessor that can only be read while the condition remains truthy.
83
+
- With `keyed={true}`, changes to the `when` value trigger a new render even when the value remains truthy, and function children receive the value directly.
82
84
- Function children are wrapped in [`untrack`](/reference/reactive-utilities/untrack).
83
-
- With `keyed={false}`, function children receive an accessor for the current non-nullish value; with `keyed={true}`, they receive the value directly.
0 commit comments