Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Updated docs related to router API #377

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

toakleaf
Copy link

Purpose of Pull Request:

Update documentation related to router API

The current state of documentation includes many (coming soon), and this PR attempts to establish some bones that others could build on.

Changes

Updated README

  • Section of readme about the router API is out spec and lacking a good example, so replaced it with same content I added to docs/api/router.md

Added docs for everything in docs/api dir

  • Used the same format as vitest's config reference doc for each router type
  • Wrote a very brief description at top of each page summarizing how I see each router type, but more than happy if anyone wants to elaborate, change anything, or most importantly let me know if I'm misinterpreting anything.

Removed the guide/what-is-a-router.md doc

  • It wasn't linked in the TOC, was not up to current spec in places, and was repetitive with new docs
  • I used it as inspiration in all the newly added docs and tried to make sure that the most useful nuggets made it elsewhere in the documentation

Reorded api/router TOC

  • I think it makes more logical sense to have the http router explained before the spa and client routers, and for those two to be sequential, as they are serving similar purposes.

Some Notes

  • target fields in the router configurations seem entirely superfluous. For all but custom routers they're both optional and defaulted to a string literal, and the only option for any type is a single string literal. Feels like this field should be removed in favor of simply using the type field, but that's beyond the scope of this PR.
  • In the client router there is an extensions field that seems completely unused. I left it out of the docs.
  • routes field in the SPA router seems a bit perplexing to me. I left it in the docs, but I do not really understand how it is meant to fit in a SPA paradigm.

Copy link

codesandbox bot commented Sep 21, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Sep 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vinxi-website ❌ Failed (Inspect) Sep 21, 2024 11:57pm

Copy link

changeset-bot bot commented Sep 21, 2024

⚠️ No Changeset found

Latest commit: 92641b9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

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.

1 participant