Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 597 Bytes

dynamic-page-find-method-advice.md

File metadata and controls

11 lines (8 loc) · 597 Bytes

Advice on using the find*() family of methods (@figma/figma-plugins/dynamic-page-find-method-advice)

⚠️ This rule warns in the 👍 recommended config.

The Figma API contains several methods, such as DocumentNode.findAll(), that require special handling when used with the dynamic-page manifest field. Before using any of these methods, your plugin code should include an await-ed call to figma.loadPagesAsync(). This call only needs to happen once per plugin run, so we recommend performing it somewhere in your plugin's setup code.