When I try to import published component into current file in Figma plugin with importComponentByKeyAsync plugin api, Figma is lagging or even freezing and I’m not able to do any operations (like manually create frame or drag layers around) during the import. It seems that importComponentByKeyAsync is not asynchronous at all. Has anyone experienced this before or has any insights about this problem? Thanks so much.
you need to edit component instance, not the component itself.; like it:
let importComponent = await Figma.importComponentByKeyAsync(‘xxxxxxx’);
const instance = importComponent.createInstance();
instance.y = 20;
it will useful