Use case of select on page, goBack then refresh

Please could someone provide me with some pointers. I am building an application which displays a list. The user will navigate to a screen to perform a selection. When the user navigates away from the selection screen and returns back I need to refresh the list with the updated results. I am trying to work out the correct technique for refreshing the screen when the route simply performs a goBack().

Is the the best use of a <Page Activated="{jsActivated}"></Page> In this instance or is there a better technique to consider for such a common scenario? The problem is with the goBack() is that when the user returns the original contents of the list are briefly displayed while a refresh back to server occurs.

Appreciate any pointers. Thanks. Steven.

Hi Steven.

In a use-case like this, you’d probably want to have a JS model that owns the data. It could then decide when it needs to update/refresh/do-whatever-else with the data.

Your pages (in this context we call them “views”) should only take care about displaying the data, not deciding what to do with it when.

If you’ve never heard of MVVM pattern before, I suggest you start with this forum thread and follow the links for an in-depth explanation of the concept, applied to Fuse.

Thank you Uldis, most helpful I’ll take a look.