In my web app the nancy session gets saved before the view is rendered which means that I cannot modify the session from inside the view.
Is there a way to change the order of operations here?
Edit: looking closer it seems like the view is rendered in parallel with other tasks (like saving the session)
No, the view is not rendered until it has been handed back over to the host. You should not be modifying the session inside your view, the view should dumb and only display a view model