Michael Lin

Results 77 comments of Michael Lin

I'm not sure if this change meets your requirements. We also welcome others to share their opinions on this issue.

> Since it's just about types and no runtime changes, what about adding an overload like From a type-checking perspective, this is still a breaking change.

hi @francescotescari , thanks for your suggestion. I've released the Mutative v1.1.0.

Thanks for your PR. From an implementation perspective, it's cleaner to add an extra change hook in `src/utils/mark.ts` and use the [JSON Patch](https://datatracker.ietf.org/doc/html/rfc6902) structure.

> I'm just re-reading your comment about using JSON Patch. I'm not sure if I understand this part of your reply, because the ProxyDraft passed to markChanged does not contain...

The workaround you mentioned is actually the appropriate approach. The 'move' operation can be composed of 'remove' and 'add' operations. Similarly, 'copy' can be replaced by 'add' (because in Mutative,...

@wenerme , I'm not sure if the `mutative()` you're referring to is the one from [zustand-mutative](https://github.com/mutativejs/zustand-mutative). In any case, it works fine with TypeScript v5.9.2. ```ts import { create }...

hi @phryneas, I will add support for return values to [mutative](https://github.com/unadlib/mutative). But from the user's point of view, we should suggest always returning the draft itself or no value at...

> Hi @unadlib! That's great news! In [writing reducers with `immer`](https://redux-toolkit.js.org/usage/immer-reducers) (which we might need to rename to "writing mutable immutable reducers" or something like that), we generally recommend changing...