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.
0
Reputation
2
Posts
734
Profile views
0
Followers
0
Following
Posts made by temka1234
RE: Mobx or immer/immutable adapter for colyseus.js
posted in Questions & Help •
Mobx or immer/immutable adapter for colyseus.js
posted in Questions & Help •
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 replaceschema
withregisterSerializer
- Recursively add
onChange
/onAdd
/onRemove
function on eachSchema
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
.