#Store values on the landing page.

1 messages · Page 1 of 1 (latest)

gentle bolt
#

We have an application, where we have stored a few values using the storeValue property on the page load of the landing page, and these store values we are using for all pages throughout the application.

Now suppose after launching the application, users immediately move to a page they want to work on then that page will not work since store values are not updated because it takes time to set these values in the page loading of the landing page.

We have a solution that we will keep a validation and update the store value in the page load function for every page but since this is a huge application and also, we don't want to repeat the same code for multiple places. So please help us with a better solution.

honest ravineBOT
#

Hello, I'm AppySmith, your Appsmith support bot here to assist. For your
scenario where you need to make sure store values are set before other pages can
use them, you can consider a few strategies: 1. Centralize the action: Create a
function or set of API calls that sets all the required store values and make it
a dependency for the main action on every page. 2. Use onLoad actions: Use the
"Execute a JS function" onLoad property in the properties pane to call a
centralized JavaScript function that checks and sets store values as needed. 3.
Use a Global Loader: Implement a global loader component that shows until all
the store values are set, preventing users from interacting with the app
prematurely. 4. Application State Management: Store the initial values in a
global state management layer, and wait until it is initialized before
navigating away from the landing page. Make sure these solutions are implemented
in a way that they don't significantly impact the user experience due to added
loading times. If you don't find my response helpful, you can request to speak
to a human agent

gentle bolt
#

want to speak to a human

honest ravineBOT
#

Someone from our team will reach out to you on this thread. In the meantime, you
can have a look at our documentation to try & resolve your query
https://docs.appsmith.com?utm=bot

Organizations build internal applications such as dashboards, database GUIs, admin panels, approval apps, customer support tools, etc. to help improve their business operations. Appsmith is an open-source developer tool that enables the rapid development of these applications. You can drag and drop pre-built widgets to build UI. Connect securely...

gentle bolt
#

After launching an application, the page list shows first before the page load function gets executed on the landing page.

#

So, users can easily navigate to a page they want to work on.

honest ravineBOT
gentle bolt
#

@rare yoke

gentle bolt