News for hackers. Stuff that matters.
Re:Why I Like Using Maps (and WeakMaps) for Handling DOM Nodes by Kiro on Saturday May 06, 2023 @05:35AM (#35839687)
And how do deserialize it back to a StringMap without manually doing so? Being able to run a JSON.stringify and then JSON.parse on your state tree seamlessly is important imo.
Re:Why I Like Using Maps (and WeakMaps) for Handling DOM Nodes by programmarchy on Saturday May 06, 2023 @09:43AM (#35841307)
I’ve been using io-ts for this and been very happy with it. [1] It’s similar to Swift’s Coding protocol in case you’re familiar.

[1] https://gcanti.github.io/io-ts/