Skip to content

Commit

Permalink
Comment out template output in best practices docs (#7288)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored Sep 18, 2024
1 parent 610d8f8 commit e197f2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/how_to/best_practices/dev_experience.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Instead of inheriting from `param.Parameterized`, using `pn.viewable.Viewer` all

For example, it's possible to use `ExampleApp().servable()` instead of `ExampleApp().view().servable()`.

```{pyodide}
```python
class ExampleApp(pn.viewable.Viewer):

...
Expand All @@ -65,14 +65,14 @@ class ExampleApp(pn.viewable.Viewer):
sidebar=[...],
)

ExampleApp().servable(); # semi-colon to suppress output in notebook
ExampleApp().servable();
```

### Okay

This method works, but should be reserved for cases where there's no Panel output.

```{pyodide}
```python
class ExampleApp(param.Parameterized):

...
Expand All @@ -83,7 +83,7 @@ class ExampleApp(param.Parameterized):
sidebar=[...],
)

ExampleApp().view().servable(); # semi-colon to suppress output in notebook
ExampleApp().view().servable();
```

## Build widgets from parameters
Expand Down

0 comments on commit e197f2b

Please sign in to comment.