I’m very new to Figma Plugin Development and I’m just trying to get a sense of how information flows from code.ts into ui.html and back. One such thing I’ll need to be able to do in the future is interact with components. Here’s what I’m trying
figma.on("selectionchange", () => {
var currentSelection = figma.currentPage.selection;
if(currentSelection.length > 0) {
figma.importComponentByKeyAsync(currentSelectiont0].id).then((component) => {
console.log(component);
}).catch((err) => {
console.log(err);
})
}
});
And it’s saying
GET https://www.figma.com/api/design_systems/library/component_v2/3:5?fv=15 404
Any thoughts? Tell me what you need to help make this easier to answer.