99
Views
4
Comments
Solved
How to Manage State across different screens in Reactive Web App ?
Application Type
Reactive

I wish to implement a simple webpage where employees can see their daily tasks and their scores related to it, I have a dashboard with all the scores which I call onReady, and set them in variables, on next page some other details are there, but when user navigate to second page, and come back to first one, all Api are recalled and page takes time to show. 

My question is, is there any state management like react/redux where I can keep values for first time and only recall them when necessary?

2023-11-22 10-51-50
Jozy Sohail
Solution

Hi Shivang,

for your requirement, try using the client variables.

check this post https://success.outsystems.com/documentation/11/reference/outsystems_language/data/handling_data/client_variable/

hope it helps.

Thanks

2024-09-17 08-54-53
Jerome Rajadurai J

Hi @Shivang Shukla,


When a page is called in destination the page is initialized again, Try to make destination as Previous screen where the screen state is maintained.

UserImage.jpg
Shivang Shukla

@Jerome Rajadurai J thanks, but I also wish to maintain a state, where I can pass any data to any page without getting it to URL query. any way to pass data then?


2024-09-17 08-54-53
Jerome Rajadurai J


Hi @Shivang Shukla, 

I understnd your need, You can use client variables or you can leverage the local storage Js functionality,

localStorage.setItem("lastname", "Smith"); --> To set the variable.
localStorage.getItem("lastname"); --> To retrieve data.

2023-11-22 10-51-50
Jozy Sohail
Solution

Hi Shivang,

for your requirement, try using the client variables.

check this post https://success.outsystems.com/documentation/11/reference/outsystems_language/data/handling_data/client_variable/

hope it helps.

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.