docs: Updated docs related to router API #377
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
docs/api/router.md
Added docs for everything in
docs/api
dirRemoved the
guide/what-is-a-router.md
docReorded api/router TOC
http
router explained before thespa
andclient
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 anytype
is a single string literal. Feels like this field should be removed in favor of simply using thetype
field, but that's beyond the scope of this PR.client
router there is anextensions
field that seems completely unused. I left it out of the docs.routes
field in theSPA
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.