-
-
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
Handler Id Warning #870
Comments
**** |
Hi, as the maintainer of the Router, I have some input on this. The warning message you see is the result of a message being attempted to be sent back to a component from an agent, but there not existing a callback to facilitate that. What this warning message is effectively saying is "Hey you are using a dispatcher somewhere!", which I consider to be noise, and the warning designation to be a misnomer - everything is acting as expected when you see this message. There are two options for how to handle this: Remove the logging entirely, or switch it to Line 321 in 99220f5
@jstarry I'll defer to you the decision about how to handle the removal or alteration of the log line. |
@hgzimmerman why is the dispatcher trying to send a message to the component? |
Hi! I am currently playing with yew-router, and had the same warnings. @jstarry, here are a few links to the code to answer your question: When the route changes, yew/yew-router/src/agent/mod.rs Lines 140 to 142 in e4a609f
yew/yew-router/src/components/router_button.rs Lines 15 to 19 in e4a609f
That subscribe to the yew/yew-router/src/agent/dispatcher.rs Line 22 in e4a609f
Lines 97 to 113 in e4a609f
yew/yew-router/src/agent/mod.rs Lines 115 to 117 in e4a609f
I guess that's parts of the how. It's late, the why will have to wait ^^ |
Might be unrelated, but I saw this when I defined routes out of order, where an earlier definition was a prefix of the later one. This specific case is mentioned in the docs, but maybe the warning could mention it or link to the docs, or mention an error code. |
Nevermind I see this in other cases now. |
So if I understood this correctly, the solution is to just to remove the warning message? |
Problem
I'm getting the following warning when switching between different routes using yew_router. I have 5 different components that I switch between when route changes using
Router::render
. One of the components has a table with 100 rows, this warning returns ~100 times when I switch off that route. Whereas one route is just an index page with static text, and it returns the warning 4 times when switched off that route.Steps To Reproduce
Steps to reproduce the behavior:
Router::render
to render different components, ex: belowThere is nothing special about these components.
IndexPage
for example just renders static text in a<p>
tag, yet still produces the above warning 4 times when route changes and different component is then rendered.Environment:
v0.11
v0.8.1
1.40.0
wasm32-unknown-unknown
stdweb
versionQuestionnaire
The text was updated successfully, but these errors were encountered: