Navigation

  • Recent
  • Tags
  • Users
  • Search
  • Login
Colyseus
  • Login
  • Search
  • Recent
  • Tags
  • Users

Documentation GitHub

We're migrating to GitHub Discussions. This forum does not accept new registrations since April 6, 2023.
  1. Home
  2. temka1234
temka1234

temka1234

@temka1234

Chat Follow Unfollow
0
Reputation
2
Posts
911
Profile views
0
Followers
0
Following
Joined 15 Aug 2021, 13:13 Last Online 30 Aug 2021, 13:25

  • 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 • 19 Aug 2021, 19:55
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 • 15 Aug 2021, 13:25

© 2023 Endel Dreyer