made query/MainView's state persist if you leave the page