Skip to content

Commit

Permalink
doc: update tutorial to mention pitfalls
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpo committed Aug 23, 2024
1 parent 89694b7 commit 1bafa52
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 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

0 comments on commit 1bafa52

Please sign in to comment.