You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using built-in ASP.NET Core mechanism for hot reloading pages after changing source code, the whole page is being reloaded, therefore all the components loose their state. It's inconvenient when working on some places deep down the component hierarchy that resets every time.
Possible solution would be to add a custom hot-reload mechanism that will send messages via web sockets stream. As a response, browser could send a request to the back-end for the new version of current page, but additionally all the state would be sent together with that request.
To do:
Investigate
Implement
The text was updated successfully, but these errors were encountered:
Could add a property bool IsPersistent to the HydroComponent class, so that every persistent component will save its props marked with [Parameter] attribute to cookies after every rendering, then upon a new Mount (it is triggered upon HotReload right?) will restore values from cookies.
Could be totally done from code-behind without changing hydro.js. Doesn't keep all the state though.. Well, just an idea. Can be interesting for not only HotReload, like navigating through pages and automatically having all previous parameters restored from last usage.
When using built-in ASP.NET Core mechanism for hot reloading pages after changing source code, the whole page is being reloaded, therefore all the components loose their state. It's inconvenient when working on some places deep down the component hierarchy that resets every time.
Possible solution would be to add a custom hot-reload mechanism that will send messages via web sockets stream. As a response, browser could send a request to the back-end for the new version of current page, but additionally all the state would be sent together with that request.
To do:
The text was updated successfully, but these errors were encountered: