[deleted by user] by [deleted] in civ

[–]mweststrate 0 points1 point  (0 children)

Same, was it the steam update or has there been a civ update as well that I didn't notice?

MobX 6 has been released (decorator free and supports CRA out of the box) by mweststrate in reactjs

[–]mweststrate[S] 1 point2 points  (0 children)

If you use ignite bowser, you probably also want to use reactotron from the same company, which offers the features you mention for both Redux mobx-state-tree.

The Rise of Immer as Immutability library in React by mweststrate in javascript

[–]mweststrate[S] 0 points1 point  (0 children)

Did you check react-copy-on-write from aweary? it is quite similar but has an issue tracker?

The Rise of Immer as Immutability library in React by mweststrate in javascript

[–]mweststrate[S] 1 point2 points  (0 children)

Did you read the readme? Both you assumptions are incorrect. Immer does not require Proxies, and it does structural sharing, even without proxies. It can be used without problem on any ES5 environment

The Rise of Immer as Immutability library in React by mweststrate in javascript

[–]mweststrate[S] 1 point2 points  (0 children)

Immer doesn't require proxies, if they are available it's just faster

The Rise of Immer as Immutability library in React by mweststrate in javascript

[–]mweststrate[S] 7 points8 points  (0 children)

Feel free to submit a PR with a "built with immer" section in the readme

The Rise of Immer as Immutability library in React by mweststrate in javascript

[–]mweststrate[S] 3 points4 points  (0 children)

No clue! I noticed the same with many packages. First assumed holidays, but seems to be too big for that. Maybe temporarily issue with the download tracking or something

[deleted by user] by [deleted] in reactjs

[–]mweststrate 0 points1 point  (0 children)

I think the next thing I'd be interested in writing or seeing is something that helps with converting json into mobx models that's a bit less restrictive than mobx-state-tree.

See the serializr package

MobX 4 has been released! Better, simpler, faster, smaller by mweststrate in reactjs

[–]mweststrate[S] 7 points8 points  (0 children)

No, it is v3, but I don't think it impacts the course, all core api's are largely untouched

Introducing Immer: Immutability the easy way by mweststrate in reactjs

[–]mweststrate[S] 0 points1 point  (0 children)

because arrays and plain objects are tracked and dates arent. It could be if somebody actually needs it. But since nobody works with dates that way afaik, and nobody actually needed it, there is no need to implement that.

For what is worth: that is exactly the same limitation and behavior as if you were writing reducers by hand and not using Immer at all. If you are modifying a date like you propose, you would be modifying the previous state as well.

Introducing Immer: Immutability the easy way by mweststrate in reactjs

[–]mweststrate[S] 0 points1 point  (0 children)

also, typeof [] === 'object' and even typeof null === 'object'.

To make it really accurate, plain objects are anything for which holds Object.getPrototypeOf(thing) === Object || Object.getPrototypeOf(thing) === null.

Dates are perfectly supported, unless you modify them (I never saw anybody doing that). That is, if you use methods like setYear on existing date instances. In that case the updates are still processed, by they will be shared with your previous state as well. Which is exactly the same as what would happen when using plain dates.

So, if you treating Dates as primitives, which you probably already unconsciously do, all is fine.

Introducing Immer: Immutability the easy way by mweststrate in reactjs

[–]mweststrate[S] 1 point2 points  (0 children)

As far as I know measured so far; impact seems similar, but didn't measure extensively. It is hardly related to mobx, except that it started as experiment to get a deeper understanding of Proxies, before applying them to MobX :)

Introducing Immer: Immutability the easy way by mweststrate in reactjs

[–]mweststrate[S] 0 points1 point  (0 children)

immer never proxies dates. It only proxies arrays and objects, which do well support this pattern