Navigation

    Colyseus
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Users
    1. Home
    2. temka1234
    temka1234

    temka1234

    @temka1234

    Chat Follow Unfollow
    0
    Reputation
    2
    Posts
    413
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Continue chat with temka1234
      • Flag Profile
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    temka1234 Follow

    Posts made by temka1234

    RE: Mobx or immer/immutable adapter for colyseus.js

    Hi @endel,
    Thanks for links!
    I tryied to implement mobx adapter in such way and discover that some changes not emitted (collection: splice, clear) but presented in result schema state :(
    At the moment i want to implement my decode function, but source schema code is not clear.

    posted in Questions & Help •
    Mobx or immer/immutable adapter for colyseus.js

    Hi all!

    As colyseus client im using colyseus.js.
    Is there a way to get simple changes from server for using with mobx/immer/immutable libraries?

    I see few ways to resolve it:

    • Override SchemaSerializer and replace schema with registerSerializer
    • Recursively add onChange/onAdd/onRemove function on each Schema field
    • Get toJSON on each change and replace with current (too slow)

    First two ways can't implemented without access to private fields like $changes.

    posted in Questions & Help •