Pass Values Between Pages
Learn when page context should travel in the URL, stay per-tab, or persist in browser storage so Wappler navigation remains predictable.
Pass Values Between Pages
Section titled “Pass Values Between Pages”This tour is about carrying just enough context from one page to the next without turning browser state into a hidden dependency. In Wappler, the right choice depends on whether the value should be shareable in the URL, temporary for one tab, or persistent across visits.
Choose the transport by lifetime
Section titled “Choose the transport by lifetime”If the next page should be bookmarkable or shareable, keep the value in the URL. If the value is only part of a temporary workflow, store it in session state. If it should survive return visits, use local or cookie-based persistence deliberately.
Avoid hidden coupling
Section titled “Avoid hidden coupling”A common mistake is passing important page context in storage when the user actually expects a real link. Hidden state makes refreshes, deep links, and debugging harder. Use browser storage only when invisibility is a feature, not an accident.
important: If someone should be able to reload or share the destination page and see the same record, prefer URL state.
Practical patterns
Section titled “Practical patterns”Use the same mental model whether you are passing a selected record id, a search term, or part of a multi-step workflow.
Pattern: selected record or filter
Section titled “Pattern: selected record or filter”When the destination page should open a specific record or filtered view, pass the key or filter in the URL so the page can reconstruct itself cleanly. This keeps the navigation honest and easier to debug.
Pattern: multi-step workflow handoff
Section titled “Pattern: multi-step workflow handoff”If the next page is part of a wizard or temporary task, use session state to carry draft values forward without polluting the address bar. Clear the state once the workflow is complete so stale values do not confuse the next run.
Pattern: remembered preference
Section titled “Pattern: remembered preference”If the page handoff is really about preserving a user preference, use cookie or local storage instead of pretending it is page identity. That keeps routing clean while still remembering what the user chose last time.
Wrap-up
Section titled “Wrap-up”Continue into the state-management family from here.
Next steps
Section titled “Next steps”Choose a related state-management tour to continue.