-
-
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
Add documentation on how to create a Context Producer in a struct Component #2943
Comments
Note that example produces messages, not contexts. The Choosing On the context consumer side, a struct component example is also given, though I concede, it could be more clearly documented. The docs for |
Actually, I did make it work now. The problem seemed to be having a Router Element in my HTML. If I leave this out, everything works as expected: So this works:
while this does not:
The only difference is the change from the verbatim So this might not be a documentation bug, but instead a real bug where Switch is blocking |
@WorldSEnder should I file a new issue for the above bug report, namely that |
@SirVer that would indeed by unexpected, a bug report with a reproducible example would be appreciated :) |
@WorldSEnder I tried to make my failure case smaller, but once it was very small the problem did not reproduce again. I rebuild back up to my original starting point and everything continued working. I am confused, since the diff is nill, expect that I ran |
This is about:
Problem
Yew 0.19 does not contain examples on how to deal with shared Context and the documentation is very sparse. Yew mainline contains examples to produce context in a
function_component
and how to subscribe to one in a function and a struct component - and again, the documentation remains sparse.However, there is no mention or example on how to create a Context producer in a struct component and my experiments led nowhere.
I tried asking about this on Discord, but this is not a great way of getting help - questions are buried there never to be found again.
Questionaire (Optional)
As mentioned, I am not qualified to write this documentation, since I cannot figure it out.
The text was updated successfully, but these errors were encountered: