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

Router docs about set-only components #2214

Merged
merged 9 commits into from
Dec 5, 2021

Conversation

Madoshakalaka
Copy link
Contributor

@Madoshakalaka Madoshakalaka commented Nov 28, 2021

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 the Switch 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 an AnyHistory instead, for compatibility to other environments.

Checklist

  • I have run cargo make pr-flow
  • I have reviewed my own code
  • [NA] I have added tests

@github-actions
Copy link

github-actions bot commented Nov 28, 2021

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
voidpumpkin previously approved these changes Nov 29, 2021
@voidpumpkin voidpumpkin added A-yew-router Area: The yew-router crate documentation labels Nov 29, 2021
Co-authored-by: Julius Lungys <32368314+voidpumpkin@users.noreply.github.com>
voidpumpkin
voidpumpkin previously approved these changes Nov 29, 2021
Co-authored-by: Simon <simon@siku2.io>
@voidpumpkin voidpumpkin merged commit 338dcd8 into yewstack:master Dec 5, 2021
@futursolo futursolo mentioned this pull request Dec 5, 2021
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew-router Area: The yew-router crate documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants