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 the branch matches. Function children receive an accessor or value based on `keyed`.
82
+
Content rendered when the branch matches.
83
83
84
84
## Return value
85
85
86
86
-**Type:**`JSX.Element`
87
87
88
+
Returns the selected branch or the `fallback` content.
89
+
88
90
## Behavior
89
91
90
-
-`<Switch>` evaluates its child `<Match>` elements in order and renders the first truthy branch.
92
+
-`<Switch>` evaluates its child `<Match>` elements in order and renders only the first truthy branch.
91
93
- If no branch matches, `<Switch>` renders `fallback`.
92
-
-Function children in `<Match>`follow the same keyed behavior as [`<Show>`](/reference/components/show): with `keyed={false}`, they receive an accessor; with`keyed={true}`, they receive the value directly.
94
+
-With `keyed={false}`, function children in `<Match>`receive an accessor that can only be read while that branch remains selected. With`keyed={true}`, they receive the value directly.
0 commit comments