SolidJSS
SolidJS16mo ago
280 replies
hcker2000

Saving data to a store that has a getter?

i have an issue in that i need to figure out how to add to the scenes[selectedSceneId].sounds array

that 2nd line was an idea but not a good one, im guessing i need to use a setter but am not quite sure how.

This is my setter:

    selectedSceneId: null,
    playingSounds: false,
    get selectedScene() {
        return this.scenes.find(obj => obj.id === this.selectedSceneId);
    },
image.png
image.png
Was this page helpful?