FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

docs(navigation): fix use_route and Stack.Screen examples by crux200 · Pull Request #51 · pythonnative/pythonnative · GitHub

Repository navigation

docs(navigation): fix use_route and Stack.Screen examples - #51

Merged
owenthcarey merged 2 commits into
pythonnative:mainfrom
crux200:docs/fix-navigation-examples
Sep 2, 2026
Merged

owenthcarey merged 2 commits into
pythonnative:mainfrom
crux200:docs/fix-navigation-examples

Conversation

crux200 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes broken navigation code examples across three docs pages so they match the real API in src/pythonnative/navigation.py.

Changes

  • docs/getting-started.md: use_route() returns the params dict directly — removed the extra .params. indirection. Fixed Stack.Screen("Home", HomeScreen, ...) to use the required keyword-only component= argument.
  • docs/guides/navigation.md: same Stack.Screen(...) keyword-argument fix, applied at all three occurrences (lines ~35-36, ~63-64, ~178-179).
  • docs/examples/navigation.md: fixed route['params']['user_id'] → route['user_id'] (params dict is already unwrapped). Replaced the reference to nav.replace(...), which doesn't exist on the navigator handle, with nav.reset(...) — the correct method for resetting the stack.

Verification

  • mkdocs build --strict completes with no errors related to these files.
  • Manually ran the corrected getting-started.md snippet (HomeScreen/DetailScreen/App with use_route() and component=) against the installed package — imports and defines cleanly with no errors.

Fixes #36

Varghese Thomas and others added 2 commits September 1, 2026 14:18
…ples

The Tab and Drawer Screen factories share the keyword-only component=
signature with Stack.Screen, so the remaining positional calls in the
navigation guide raised TypeError. Issue pythonnative#36 listed only the Stack.Screen
lines, so this completes the sweep.
owenthcarey merged commit 7e59651 into pythonnative:main Sep 2, 2026
15 checks passed

Copy link
Copy Markdown
Contributor

Thank you so much!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix broken navigation examples in the docs (use_route, Stack.Screen, nav.replace)

2 participants


Back | FazBrowse Home | New Git URL