Skip to main content
February 5, 2024
Question

How should I get the mainComponent of the detached component in Dev Mode?

  • February 5, 2024
  • 2 replies
  • 199 views

The figma.importComponentByKeyAsync() method cannot be used under devMode, how should I get the mainComponent of the detached component in devMode mode?

This topic has been closed for replies.

2 replies

tank666
February 5, 2024

As a possible way, try to find an instance in the document whose main component has the same key.

UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
_UED1Author
February 7, 2024

Thank you for your reply. There seems to be no better way at the moment.