#deep: true useStore config not working

4 messages · Page 1 of 1 (latest)

marsh bison
#

I have the following code

const wasms: Record<string, NoSerialize<ArrayBuffer>> = useStore({}, {deep: true});

And then later I do a map on this

      {Object.entries(wasms).map(([name, bytes]) => <button onClick$={async () => {

but before hand I update wasms like so

wasms[file.name] = noSerialize(bytes);

And the update isn't causing the list of buttons to rerender. Am I doing this properly?

marsh bison
#

got it to work, the issues seems to be around a lack of support for updating an object using square bracket notation

#

had to do something like ```js
wasms = {...wasms, [file.name]: noSerialize(bytes)}

minor stump