Working with Arrays in Browser State
Use App Connect Data Store and browser state patterns when you need lists, selections, and batch-friendly client-side data in Wappler.
Working with Arrays in Browser State
This tour helps you decide where array-like client-side data belongs in Wappler. Arrays are useful when the browser needs to remember a selection, a temporary working set, or a client-side collection before anything is sent to the server.
Use arrays for active working sets
Arrays are a good fit when the user is building up a list: selected items, temporary rows, filters, favorites, or cart-like state. The key is to decide whether that list belongs in a dedicated Data Store, in temporary session state, or in persistent local storage.
Keep the data shape intentional
Browser-state arrays are easiest to work with when every item has a predictable shape. If you find yourself storing a loose mix of values, it becomes harder to bind, update, and debug the UI later.
tip: Prefer predictable objects over anonymous mixed values so bindings and actions stay readable.
Common array patterns
Most array workflows in Wappler fall into a few repeatable patterns.
Pattern: selected items list
Use an array when users need to build a temporary selection before acting on it, such as choosing products, files, or records. A Data Store is usually the clearest fit when the list needs add/remove/update behavior in the UI.
Pattern: cart or staged collection
When the array behaves like a client-side cart or staged edit set, treat it as its own collection. That makes it easier to compute totals, bind repeat regions, and eventually hand the final payload off to the server.
Pattern: decide whether the list should survive
Before you persist an array, ask whether the user expects it to come back later. If yes, local or cookie state may be appropriate. If not, let it stay session-scoped or in a temporary Data Store-backed workflow.
Wrap-up
Continue into Data Store or the broader state-management branch from here.
Next steps
Choose a related state-management tour to continue.