Skip to content

Commit

Permalink
Update tutorial.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpo authored Aug 23, 2024
1 parent 6a1831c commit e8098ea
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ const Page = () => {
};
```

> **💡 Important note 💡**
>
> Sometimes, you will have issues at some points with elements not properly registered spatially.
> We'd like to mention it right now because you will not understand once you get the issue (if you ever do).
>
> 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**.
> _Workaround is simple_, but we'd recommend to be aware of it 😉
>
> [Read it here!](https://github.com/bamlab/react-tv-space-navigation/blob/main/docs/pitfalls.md)
### Add behaviour when you select an element

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

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

### Don't forget to check out the pitfalls

⚠️ 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.
Workaround is simple but you should be aware of this limitation 😉

[Read it here!](https://github.com/bamlab/react-tv-space-navigation/blob/main/docs/pitfalls.md)

### Handling a side menu

You can check out the example app for this.
Expand Down

0 comments on commit e8098ea

Please sign in to comment.