Skip to content

Commit

Permalink
docs(tutorial): update to be compatible with v3
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Mar 16, 2024
1 parent b497633 commit 350cd91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/vitepress/guide/tutorial/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ First, we need to get the `state` instance from a trame server to simplify its m
```python
from trame.app import get_server

server = get_server()
# trame v3 use vue3 as default
server = get_server(client_type="vue2")
state = server.state
```

Expand Down
4 changes: 2 additions & 2 deletions docs/vitepress/guide/tutorial/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pip install vtk # Install the VTK library

**Notes**:
- `venv` was added in Python 3.3.
- On a Mac with ARM architecture, VTK is only available with Python 3.9.
- On a Mac with ARM architecture, VTK is only available with Python 3.9+.

## Running the application

Expand Down Expand Up @@ -45,7 +45,7 @@ from ***trame***'s `app`, we import the factory function for retrieving a server
Next, we define the graphical user interface (GUI) by passing the server to which it should be bound. Then with that layout we update the toolbar's title to read `"Hello trame"`.

```python
server = get_server()
server = get_server(client_type="vue2")

with SinglePageLayout(server) as layout:
layout.title.set_text("Hello trame")
Expand Down

0 comments on commit 350cd91

Please sign in to comment.