Skip to main content


This package adds Next.js-specific capabilities to Uniform.



Provides client-to-server score transition using cookies for Next.js server-side rendering (SSR). This class is used when creating the Context.
- Constructor
Creates a new object using the specified options.
  • optionsNextCookieTransitionDataStoreOptions
    + show child attributes
- Events
Fired when the data is updated asynchronously (i.e. a promise resolves with new data from a backend).
+ show event data members
- Members
dataVisitorData (read-only)
The visitor data.
Deletes a visitor's stored data, forgetting them.
  • fromAllDevicesboolean (optional)- If false, logout from this device ID. If true, forget all data about the visitor and their identity.
Returns: Promise<void>
eventsobject (read-only)
Object used to add and remove listeners for the events emitted by the TransitionDataStore.
+ show child attributes
When we load on the client side after a server side rendering has occurred (server to client transition), we can have a page script (ID: __UNIFORM_DATA__) that contains the computed visitor data from the SSR/edge render. This data is injected into the first render to allow score syncing and the server to request commands be applied to the client side data store.
  • ServerToClientTransitionState- Client transition state was resolved.
    + show child attributes
  • null- No client transition state was resolved.
initialDataVisitorData (read-only)
During server-side rendering we pre-fetch the data before rendering for the visitor, and pass it in here in order to avoid any asynchonry during SSR. This property is set through the constructor.
updateData(commands, computedValue)
Deletes a visitor's stored data, forgetting them.
Returns: Promise<void>