Home > @uniformdev/context > Context > update

Context.update() method

Updates the Context with new data of any sort, such as new URLs, cookies, quirks, and enrichments.

Only properties that are set in the data parameter will be updated, for example if passing url but not cookies, the last known state of cookies will be preserved.

Properties that do not result in a changed state, i.e. pushing the same URL or cookies as before, will NOT result in a recomputation of signal state.

Signature:

Parameters

ParameterTypeDescription
newDataPartial<ContextState>

Returns:

Promise<void>