resolveAllData

Utility function to execute all resolveData methods on a data payload outside of the <Puck> editor, returning the updated value.

import { resolveAllData } from "@puckeditor/core";
 
const updatedData = await resolveAllData(data, config);

This is useful if you need to run your resolvers before passing your data to <Render>.

Args

ParamExampleType
data{}Data
config{ components: {} }Config
metadata{}Metadata

metadata

An optional Metadata object to pass to the resolvers. Defaults to {}.

Returns

The updated Data object.