SolidJSS
SolidJSโ€ข2y agoโ€ข
11 replies
Basil

Using SolidJS's produce(), but with Immer-style patch generation?

Is it possible to use SolidJS's produce, but with patch generation akin to Immer's produceWithPatches? (being able to only store the delta (patches), as well as supporting things like classes)

I'm currently using a combination of Immer's produceWithPatches and reconcile to work with a state that's made up of nested instances of various classes. The only reason I'm using Immer in the first place is to get the undo/redo functionality with little fuss, but it doesn't play well with SolidJS, and is slow and results in unnecessary re-renders.
Was this page helpful?