This solution works well if you know the state that you want the application to be in in the first place. But I would really prefer that the application drive the state.
For instance I should initialize my application with a certain state that is driven by the url.
Say I enter the server with the following URL: http://localhost:5006/material-test-summary-panel?app_user=sammaphey&records=123456&relationships=456789 if I log the state location (pn.state.location.query_params) then the resulting dict looks like: {}, when I would expect it to look like: {'app_user': ['sammaphey'], 'records': ['123456'], ...}. So How am I supposed to get the url state when the app is initially loaded? utilizing the pn.state.onload method does not seem to work unless I manually set what the state should be.
In addition how would I now be able to change any of the url params as the application runs? Using update_query doesn’t actually seem to do anything if I call it when I make a change to a particular parameter in the application