Lost history when refresh page(web_sys)
jetli opened this issue · 4 comments
Describe the Bug
Navigate a few routes, and refresh the page, the whole route history is lost, back button of browser is disabled. Seems push state history is not properly stored and restored.
Related Info
- yew version: 0.13.0
- yew-router version: 0.10.0
- feature: web_sys
Strange. Is this using the non-default type parameter for the Route's STATE
? I know that the default ()
tends to cause problems serializing and deserializing, and that might be the source of the problem.
The most likely fix would be to declare an empty struct that implements the required traits to be STATE
and use that in place of ()
as the default parameter.
I'm still confused as to why this is happening on web_sys only at the moment though :/
I haven't tried stdweb yet, not sure whether this is happening on stdweb.
I cannot reproduce this now, close this issue for now.