docs(examples): add warning about examples matching the main branch (#778)

This commit is contained in:
Josh McKinney 2024-01-10 23:44:23 -08:00 committed by GitHub
parent c69ca47922
commit 34648941d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,18 @@
# Examples
> [!WARNING] The examples in this folder run against the `main` branch. There may be backwards
> incompatible changes to the example code.
>
> If you find that code copied from an example fails to run in your own application, please check
> the tag of the release that your project is using.
>
> To view examples that match the version of Ratatui that you are using checkout the matching tag in
> your local git repository, or select the tag in the "Switch branches/tags" button if you're
> viewing this file on GitHub.
>
> To use incompatible example code as is, you can also use the most recent alpha release of Ratatui
> (we release these weekly).
These gifs were created using [VHS](https://github.com/charmbracelet/vhs). Each example has a
corresponding `.tape` file that holds instructions for how to generate the images. Note that the
images themselves are stored in a separate git branch to avoid bloating the main repository.