Updating UI by routing

Hello everyone, how am I able to update views bei routing ?
By Routing back to a view with the UI.navigate function the view is not updated and shows only the “old” state. For my views I am using @UIScope anotation. My app is build with spring boot.

https://vaadin.com/docs/latest/routing/lifecycle

ohh so I should use vaadin navigation lifecycle for that ?

You automatically use it by navigating between views, you just have to hook yourself into it by adding the interfaces (as needed) to your routes

Remove @UIScope if you want to recreate the view on navigation

My view got nested components that also have @uiscope do i need to remove them as well ?

Depends on how you want them to behave. If you want them to maintain state, then keep the annotation.

My view got nested components that also have @uiscope do i need to remove them as well ?
That depends purely on your application. Business object can be ApplicationScope, SessionScope, UIScope or RouteScope. It just defines the life cycle of it. All of them can be justified based on specific purpose.

So if i remove the uiscope frome the ui the scopes from the component below on the hierarchy doesnt “override” the scope of the view ?

No