Oh I think I know what you might be trying to do. You want to do something to the UI then make sure it gets saved to the database? That is kind of the wrong way of thinking about it. Think of what it means for the user to have something saved in the database. What it really means is that when you reload the page then that state persists.