Basil
Using SolidJS's produce(), but with Immer-style patch generation?
Example:
When running
store.arr[1].someVal = 0;
, the path of the delta that gets generated is ['arr', 1]
, instead of the expected ['arr', 1, 'someVal']
. It stores an instance of the Subclass
class instead of just a number.12 replies
Using SolidJS's produce(), but with Immer-style patch generation?
Wrapping things in
createMutable
does help, but the granularity is lost; updating a value in a class causes captureStoreUpdates
to return an instance of the class, instead of just the one property.12 replies
Using SolidJS's produce(), but with Immer-style patch generation?
Immer has copy-on-write, so if I do something like this:
immerProduceWithPatches
will generate patches, but it will not be changed on the underlying s
object that Solid's produce
(solidProduce
here) gives you. Even applyPatches
is copy-on-write, so it has the same issue.12 replies
Nested Immer "produce" signals with components
If you mean something like:
I don't think that would work with the patch generation, since it would just make the patches relative to
.some.path
and you couldn't just put that into a undo/redo context.7 replies
Nested Immer "produce" signals with components
Would you even be able to use stores with Immer? Since Immer returns a completely new object, using the store setter to set the object would mean you won't get the fine-grained reactivity, right?
7 replies