-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Router docs about set-only components #2214
Merged
Merged
Conversation
This file contains 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
Visit the preview URL for this PR (updated for commit 525fe36): https://yew-rs--pr2214-router-docs-ou0tjprx.web.app (expires Sun, 12 Dec 2021 02:08:48 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
# Conflicts: # packages/yew-router/src/components/link.rs
voidpumpkin
requested changes
Nov 28, 2021
voidpumpkin
previously approved these changes
Nov 29, 2021
voidpumpkin
requested changes
Nov 29, 2021
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
voidpumpkin
previously approved these changes
Nov 29, 2021
siku2
reviewed
Dec 4, 2021
Co-authored-by: Simon <simon@siku2.io>
siku2
approved these changes
Dec 5, 2021
voidpumpkin
approved these changes
Dec 5, 2021
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Router docs about set-only components.
Reword router docs,
use implementation on AttrValue instead of reimplementing.
Fixes #0000
Set-only access to the history is often needed. In some cases, the
Router
and theSwitch
components can do all the work listening and rendering different components.Currently, the docs don't mention how to do it in the function component section. This can be done by calling
BrowserHistory::default()
which is part of the public API in the prelude. undocumented too ;)@futursolo says he will work on a setter-only history API but probably won't make it to the 0.19 release. So I find it necessary to include it here.
Note the API in the future will probably still use the current
BrowserHistory::default()
implementation, but provide it as anAnyHistory
instead, for compatibility to other environments.Checklist
cargo make pr-flow