{
  "id": 11190389,
  "title": "I abused JS to abuse Yjs",
  "url": "https://urgent.news/2026/10/01/i-abused-js-to-abuse-yjs",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-01T12:40:31.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/merkle_bonsai/i-abused-js-to-abuse-yjs-69m"
  },
  "original_language": "en",
  "account": "The author wanted to keep their TypeScript classes and didn't want to build a CRDT framework. They created Plexus, a framework that allows them to use their existing classes and MobX decorators while collaborating collaboratively with Yjs. The problem was that Yjs is a CRDT engine, which gives shared data structures that can be modified independently on different peers and merged, but using them directly would make the application model incompatible with their existing classes. To solve this, the author needed to change the decorator used, not the model. However, the migration was challenging because the application model was already built around classes and MobX decorators. The author tried to use stage-3 decorators to avoid the temptation of using stage-2, but it required polymorphic decorators to replace getters and setters on auto-accessors. This made the process more complex, but it allowed them to keep their existing classes and only change the decorator used, keeping the external behavior of their classes.",
  "summary": "Because I just wanted to keep my TypeScript classes. I was not trying to build a CRDT framework. Honestly, I really, really wanted to avoid building one, and I guess you can see that in the API. I ended up creating Plexus ( https://plexus.here.build/ , https://github.com/here-build/plexus ). I had a fairly large TypeScript object model. It originally grew out of the open-source model by third…",
  "key_points": [
    "Author creates Plexus framework to use existing classes with Yjs",
    "Plexus allows MobX decorators while collaborating with Yjs",
    "Migration complex due to existing classes and MobX decorators"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}