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

Bring the context method more inline with other Yew APIs by separating #1891

Closed
wants to merge 1 commit into from

Conversation

Diggsey
Copy link
Contributor

@Diggsey Diggsey commented May 31, 2021

registration from getting the current context value.

Description

The context() method on scopes now returns a Context<T> object. This object has separate methods to access the current context vs listen for when the context changes. The use_context hook continues to automatically do both.

The need for this split became apparant during the work on #1860 but makes sense to merge separately.

Checklist

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

registration from getting the current context value.
@mc1098 mc1098 added the A-yew Area: The main yew crate label Sep 20, 2021
@voidpumpkin
Copy link
Member

Looks to me in https://yew.rs/next/concepts/contexts there is an example where you can pass a callback that would trigger on changes, thus i dont think this is an an issue.
Please message me if you disagree, for now im closing the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-yew Area: The main yew crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants