Hi there,
I am new to development and I recently released a simple plugin for generating a defined set of pages in Figma. I am working on the next release of it by adding a feature to let the user create, read, update and delete the list of names for pages so that the plugin can generate their personalized set of pages when they select the list and run the plugin. The list they create and save will just be a string.
From reading a lot of posts, the recommended API is figma.clientStorage which I’m having a hard time figuring out how to use it. Can this only be used in the code.ts
file? I tried using this code in code.js
but I’m getting the below error in the console:
Promise {<rejected>: 'Failed to set client storage key "key": Error: Cannot access client storage without a plugin ID'}
I am using the figsvelte plugin development boilerplate.
I was wondering if there are there are any other simple alternatives to store plugin data so that everytime a user runs the plugin, it has the data they saved?
I’d really appreciate it if someone can explain in simple terms how to approach this.
Thanks!