Capítulo 369 de 988

Chapter 369: updateDefaultProps()

Core Idea

:::info Deprecated This function is an alias for saveDefaultProps(). Use saveDefaultProps() instead.

Key Concepts

  • Examples
  • unsavedDefaultProps
  • Requirements
  • See also

Code Examples

// @target: esnext

await saveDefaultProps({
  compositionId: "my-composition",
  defaultProps: () => {
    return {
      color: "green",
    };
  },
});
  • What it demonstrates: Usage pattern for updateDefaultProps() from the official docs.

Key Takeaways

  1. Understand examples when working with updateDefaultProps().
  2. Understand unsaveddefaultprops when working with updateDefaultProps().
  3. Understand requirements when working with updateDefaultProps().
  4. Understand see also when working with updateDefaultProps().

Connects To

  • Clipper: related page in the Studio, Player & Editing section.
  • Design Systems: related page in the Studio, Player & Editing section.
  • Editor Starter: related page in the Studio, Player & Editing section.