🦄 Puck 0.12.0 released: React Server Components, mobile support and a Remix recipe →
DocsDocsHire usHire us (opens in a new tab)
GitHubGitHub (opens in a new tab) (opens in a new tab)
  • Introduction
  • Getting Started
    • Component Configuration
    • Root Configuration
    • Multi-column Layouts
    • Categories
    • Dynamic Props
    • External Data Sources
    • Server Components
    • Prop Migration
    • Data Migration
    • Custom Fields
    • Render Functions
    • Plugins
    • Components
      • <DropZone>
      • <FieldLabel>
      • <Puck>
      • <Render>
    • Configuration
      • Config
      • ComponentConfig
      • Fields
        • Base
        • Array
        • Custom
        • External
        • Number
        • Object
        • Radio
        • Select
        • Text
        • Textarea
    • Functions
      • migrate
      • resolveAllData
      • transformProps
    • Plugins
      • Functions
      • Actions
    • App State
    • Data

On This Page

  • Returns
  • Notes
Question? Give us feedback → (opens in a new tab)Edit this page
Docs
API Reference
Functions
migrate

migrate

Migrate the Data payload to the latest shape, automatically transforming deprecated data.

import { migrate } from "@measured/puck";
 
migrate(legacyData);

Returns

The updated Data object.

Notes

  • Called internally whenever you pass data to <Puck> or <Render>, or calling transformProps.
FunctionsresolveAllData

MIT © 2023 Measured Corporation Ltd.