I built a multipage app in Retool where the first page contains multiple user inputs and calculations based on those inputs. I've tried two methods to pass data to the second page:
Using localStorage:
Issue: Cannot read the latest data
Issue: The data takes too long to load
Using URL method:
Issue: Page 2 cannot find the saved data
Specifically: Shows 0 keys
Could you help identify what's wrong with these methods and suggest a solution?"
Hi @Freya both of these event handlers are working for me
Are you triggering them at the same time? If so, there could be a race condition, and I would recommend triggering the localStorage one first before the go to page event.
Otherwise, could you share an app export for us to test with?
And I want to call this number in page two, the saving rate is used in a query and in that query is almost all localstorage data. The second one just number display from page one to page two. Those two values all states 0 and not being sucssfully called
I tried with url and localstorage method for this two click event, but they are not working.
Also do I need run localstorage.clear() each time to refresh the page's memory?
No, you usually don't need to run localstorage.clear() each time.
It's a little hard to tell what is happening here with the screenshots It seems like some of the event handlers have several events that are all triggered at the same time, which maybe is causing information to be out of date. Is the user clicking on each statistic component, and then clicking the go to page button?
If you're still working on this and want to chat through it live, we have office hours on Tuesdays & Thursdays
In case it is helpful, here is the below example I am testing with, which seems similar, but it's working for me: