Skip to content

Commit e8098ea

Browse files
author
Pierre Poupin
authored
Update tutorial.md
1 parent 6a1831c commit e8098ea

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

docs/tutorial.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,16 @@ const Page = () => {
104104
};
105105
```
106106

107+
> **💡 Important note 💡**
108+
>
109+
> Sometimes, you will have issues at some points with elements not properly registered spatially.
110+
> We'd like to mention it right now because you will not understand once you get the issue (if you ever do).
111+
>
112+
> The symptom is that the elements order can be messed up when trying to navigate. It happens usually when dealing with **asynchronous data** and **conditional rendering**.
113+
> _Workaround is simple_, but we'd recommend to be aware of it 😉
114+
>
115+
> [Read it here!](https://github.com/bamlab/react-tv-space-navigation/blob/main/docs/pitfalls.md)
116+
107117
### Add behaviour when you select an element
108118

109119
Simply add an `onSelect` props to a node, very similarly as if you were adding a `onPress` props.
@@ -203,13 +213,6 @@ Check out the [ScrollView API docs](https://github.com/bamlab/react-tv-space-nav
203213

204214
See the [API documentation for VirtualizedLists](./api.md#spatialnavigationvirtualizedlist).
205215

206-
### Don't forget to check out the pitfalls
207-
208-
⚠️ It is very likely that you will have issues at some points with elements not properly registered. It happens often when dealing with asynchronous data.
209-
Workaround is simple but you should be aware of this limitation 😉
210-
211-
[Read it here!](https://github.com/bamlab/react-tv-space-navigation/blob/main/docs/pitfalls.md)
212-
213216
### Handling a side menu
214217

215218
You can check out the example app for this.

0 commit comments

Comments
 (0)