Chapter 365: saveDefaultProps()
Core Idea
Saves the defaultProps for a composition back to the root file. updateDefaultProps() is an alias for this function.
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 saveDefaultProps() from the official docs.
Key Takeaways
- Understand examples when working with saveDefaultProps().
- Understand unsaveddefaultprops when working with saveDefaultProps().
- Understand requirements when working with saveDefaultProps().
- Understand see also when working with saveDefaultProps().
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.