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
Copy file name to clipboardExpand all lines: docs/pitfalls.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
-[Explanations](#explanations)
7
7
-[Accessibility](#accessibility)
8
8
9
-
## Conditional rendering
9
+
## Conditional rendering & dynamic ordering
10
10
11
11
### TLDR
12
12
@@ -26,6 +26,26 @@ If navigation elements are conditionnally visible, it is necessary to wrap them
26
26
</View>
27
27
```
28
28
29
+
The same goes for mapping over a list of elements that can change. The trick in that case is to wrap the elements with a SpatialNavigationNode that is keyed by the list index.
30
+
Yes, this is bad practice in general, but it is justified here because we really want the SpatialNavigationNode components to never change even if the list moves.
31
+
It will force the children to re-render but we have no better recommendation yet!
0 commit comments