SyncedText does throw an exception as show in the example below:
I would except that SyncedText is a valid synced object.
import { SyncedText, syncedStore, observeDeep } from "@syncedstore/core";
export const store = syncedStore({ myObject: {} });
store.myObject.myText = new SyncedText("hello");
observeDeep(store.myObject.myText, () => { // Does throw an exception
store.myObject.myText.toString();
});
store.myObject.myText.insert(0, "My name is Bob, ");
SyncedText
does throw an exception as show in the example below:I would except that SyncedText is a valid synced object.
I did create a codesandbox example, so it can be reproduced easily: https://codesandbox.io/s/syncedstore-syncedtext-issue-kpomzt?file=/src/index.js:0-386
This part has been taken from the docs: https://syncedstore.org/docs/advanced/text#syncedtext-objects