We have all been warned not to use ES6 classes. Perhaps by our colleagues, or perhaps by the endless amount of scary blog posts that show up if you dare Google the subject. However, if you thought you had a use case for them you might have used them anyway (or perhaps you are in too deep and cannot rewrite your entire codebase). And now you stumbled upon this serialization problem and need to quickly find a solution that isn’t “just use TypeScript instead”.
Or rather, how they don’t.Continue reading