mobxjs / mobx-state-tree

Full-featured reactive state management without the boilerplate
https://mobx-state-tree.js.org/
MIT License
6.94k stars 640 forks source link

Removes deprecation notice for preProcessSnapshot & postProcessSnapshot #1986

Closed jamonholmgren closed 1 year ago

jamonholmgren commented 1 year ago

preProcessSnapshot and postProcessSnapshot were deprecated in #1165, but have proven to be very popular in normal usage still (over types.snapshotProcessor, the replacement), and developers seem to prefer the ergonomics of them. So this PR un-deprecates them, as we don't intend to remove them.

(There is a bunch of (unavoidable, mostly) prettier cleanup in this file, but I've noted the specific two lines that have been removed.)

cc @xaviergonz if you're interested

xaviergonz commented 1 year ago

the good thing of types.snapshotProcessor vs the old ones was the superior TS typing, so the deprecation was added so people could slowly move towards that improvement, but if you feel that's not a good reason to deprecate it then sure, undeprecate it.

jamonholmgren commented 1 year ago

Helpful to know, @xaviergonz. When (if?) we do a docs cleanup pass, this would be a good thing to note.

jamonholmgren commented 1 year ago

Released as 5.1.7: https://github.com/mobxjs/mobx-state-tree/releases/tag/v5.1.7