Skip to main content
Question

How to Persist Figma Component Instance in Plugin memory and perform Operations on it

  • March 17, 2024
  • 1 reply
  • 99 views

Hi Community ,

When ever we create any node like frame , component , rectangle , image in plugin it instantly shows on current page of the user . And than we can perform any operations we want to apply on that node right .

Can we do like when every we create a frame we don’t show it to user and still we have access of the node from the memory ?

let currentFrame;
const newFrame =  figma.createFrame();
currentFrame = frame ;
newFrame .remove();

figma.createComponentFromNode(currentFrame)

Error which i get —> Uncaught Error: in createComponentFromNode: The node with id “133:34661” does not exist
at Object.createComponentFromNode (9480-4621224429f9c047.min.js.br:1145:57317)
at :1:7

The Above Error Make sense is there is any way i can do it ? . My main goal is i create complete UI in memory and i will ask user to export the component and than it appears on the current page of the user.

This topic has been closed for replies.

1 reply

Gleb
  • Power Member
  • 4710 replies
  • March 17, 2024

No there are no such mechanics.

Construct the component on request.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings