Greetings,
Is it possible to execute a ShareDB Query server-side, then pass the results data into the client via server rendering and use that to data hydrate a client-side ShareDB query?
Use case: a page that lists a number of ShareDB documents, where server rendering is in play.
Desired behavior: the query runs against the database once during server rendering, then in the client side the same query can be instantiated with results from the first execution, then subscribed for updates without triggering the query to be executed again.
I notice there is an internal method on Queries called _ingestSnapshots. This seems useful for the task at hand.
Is it possible to leverage that method? Might it be possible to expose that method as part of the public API?
Greetings,
Is it possible to execute a ShareDB Query server-side, then pass the results data into the client via server rendering and use that to data hydrate a client-side ShareDB query?
Use case: a page that lists a number of ShareDB documents, where server rendering is in play.
Desired behavior: the query runs against the database once during server rendering, then in the client side the same query can be instantiated with results from the first execution, then subscribed for updates without triggering the query to be executed again.
I notice there is an internal method on Queries called
_ingestSnapshots. This seems useful for the task at hand.Is it possible to leverage that method? Might it be possible to expose that method as part of the public API?