h2oai / h2oai/wave

Add @app to the Page Guide

Open
#581 3 comments 0 reactions 0 assignees View on GitHub
docs good first issue
Dominant language
Python
Stars
4.3k
Forks
371
Avg merge
26d 1h
Merged PRs (30d)
1

Description

#### Is your feature request related to a problem? Please describe
The `@app('/')` feature is explained in the API section of the docs (https://wave.h2o.ai/docs/api/server#app), but is only really find-able if someone is looking for it. When users are on the Pages section of the Guide (https://wave.h2o.ai/docs/pages/) it might be nice for them to explicitly learn about `@app()` as this is a shortcut for sending apps to a specific page.

#### Describe the solution you'd like
Add a brief sentence and code snippet to the Pages Guide: https://wave.h2o.ai/docs/pages/

Right after the code for `To reference the current page in a Wave app, use q.page.`. Here is a first-pass suggestion

![image](https://user-images.githubusercontent.com/4793561/108559154-ce3ed680-72af-11eb-9dee-9a8a6f86d582.png)

```
To reference a specific page in a Wave app, use the `@app(/foo)` decorator

~
@app('/foo')
async def serve(q: Q):
page = q.page
~

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.