Menu
Menu Sheet Overlay
Search
Search Sheet

Redux Store

    The Redux store contains virtually all of the data that represents the state of your Progressive Web App. This state data is contained in a plain JavaScript object managed by Redux’s combineReducers function. All of the branches in the state tree (with the exception of the form and ui branches) are Immutable.js objects.

    This document describes the kind of data stored in each branch of the state tree and what that data is used for.

    app #

    Data type: Immutable.js map

    Contains global app state, such as the current URL. It corresponds to the App component, which is the top-level React component for your Progressive Web App.

    categories #

    Data type: Immutable.js map

    Contains information on product categories. It should not contain any individual product data. That data should be stored in the products branch.

    cart #

    Data type: Immutable.js map

    Contains information about the contents of the shopping cart, such as product names, quantities, and prices. Currently, product information is duplicated between here and the products branch.

    ui #

    Data type: plain JavaScript object

    Contains data that is relevant to the operation of the UI, but is not derived from data received from outside the app. For example, it includes flags for pieces of the UI, such as the header bar being expanded or contracted. For legacy reasons, some data from the backend is stored in this branch.

    user #

    Data type: Immutable.js map

    Contains data about the user, such as login status and user profile information displayed on the My Account page.

    modals #

    Data type: Immutable.js map

    Contains flags to determine whether a modal is open or closed. It does not contain any content that is displayed inside a modal. This branch also contains data to support persistence and pre-rendering of modals.

    notifications #

    Data type: Immutable.js list

    Contains notifications presented by the app itself on the client (as opposed to notifications presented by a push message).

    products #

    Data type: Immutable.js map

    Contains information on individual products, such as names, prices, and descriptions. Each product is keyed on a string that includes the path to the product details page and the query string for the product. This allows product listing pages to store and access product information and allows product information to be reused on other pages.

    checkout #

    Data type: Immutable.js map

    Contains information that is relevant during the checkout process, such as billing and shipping information. It will contain a mix of server-sourced and user-entered data.

    offline #

    Data type: Immutable.js map

    Contains the fetchError string that is set when the user is offline and a record of the pages the have been viewed while offline. Also allows records how long the user has been offline.

    integrationManager #

    Data type: Immutable.js map

    Contains data that is relevant to the active Integration Manager connector. This may include hidden form field keys that are necessary for communicating with the backend but irrelevant to the UI.

    form #

    Data type: plain JavaScript object

    Contains form data. It is automatically populated by Redux Form as the user interacts with a form.

    pushMessaging #

    Data type: Immutable.js map

    Contains information to support the rendering of Push messaging components.