Comments (8)
Hi @amcdnl β thanks for opening a support ticket. The nesting of RoomProviders should not be an issue indeedβit's supported since v1.5.0.
The useMutation
callback can only be called after the initial storage document has been loaded by your application. Waiting for status === 'connected'
is not enough for this. That is only the WebSocket status. After the WebSocket is connected, the Storage loading phase begins. You can listen for the storageStatus
status instead. If it's synchronized
or synchronizing
, it means it has been loaded. You can find the relevant docs here.
Hope that helps to resolve it for you!
from liveblocks.
I realize that the error message may have put you on the wrong track. I'll get that fixed π
from liveblocks.
Yup that works. Perhaps you should call that out in the docs. I'm going to close this now - thank you
from liveblocks.
@nvie - Sadly, it never moves out of not-connected
. Any clues why this might be?
Quesiton: since i'm using 2 rooms, do i need 2 liveblocks.config.ts ?
from liveblocks.
@nvie - Sadly, it never moves out of
not-connected
. Any clues why this might be?
That's odd, and definitely unexpected. Could you add the following logging options?
In your client setup:
const client = createClient({
/* options */,
enableDebugLogging: true,
});
Also, could you maybe add the following effect in one of your top-level components?
const room = useRoom();
useEffect(() => {
const unsub1 = room.events.status.subscribe((status) => console.log({ status }));
const unsub2 = room.events.storageStatus.subscribe((storageStatus) => console.log({ storageStatus }));
return () => {
unsub1();
unsub2();
};
}, [room]);
Maybe that will give you a bit more debug info.
Quesiton: since i'm using 2 rooms, do i need 2 liveblocks.config.ts ?
You would only need to liveblocks configs if you have two room types (with different data shapes in each room type). If you have multiple room instances that all have the same data shape inside them you would not need two liveblocks configs. Can you tell me a bit more about these two room (types)?
from liveblocks.
@nvie - Here is the console output:
And here is my room structure - I have 1 main room called home
and then a room for each session
tab.
from liveblocks.
@nvie - This is fun, if I add const store = room.getStorage();
it seems to start working. I think its not binding until something tells it to listen?
from liveblocks.
@amcdnl Oh yeah, you will need to trigger a storage load explicitly, either by doing a .getStorage()
call, or by using a hook like useStorage
. I was under the assumption you were doing that already. Once storage starts loading, this should work for you. Please lmk if it is not!
from liveblocks.
Related Issues (20)
- Circular Reference in JSON HOT 2
- Using an async call in an event handler HOT 1
- RangeError: Maximum call stack size exceeded HOT 1
- Please explain how to update Yjs document from the backend with streaming AND keeping the formatting.
- Clients can crash in various ways if comment is deleted that an inbox notification still references
- Add query regex filtering to metadata custom data
- liveblocksEnhancer does not mix in LiveblocksContext to the state HOT 1
- API endpoint for filtering threads by roomId prefix
- Bug: Comment Splits into Two When Typing in Vietnamese and Pressing Enter HOT 1
- OpenAPI spec is invalid
- Export the YDocUpdatedEvent type HOT 3
- Document 10-permission limit and any other limits for access tokens
- Tiptap example error breaks Liveblocks connection
- Disable Comment Notifications from all rooms HOT 3
- Remove tiptap duplicate problem
- Set Function Not Working As Inteneded HOT 3
- No changelog or release notes for 2.5.2 HOT 2
- Resolving a Thread Leaves the Comment Styling in the Editor HOT 9
- 401 Unauthorized Error on Liveblocks Authentication in Production Environment
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from liveblocks.