diff --git a/docs/guides/releases/article.html b/docs/guides/releases/article.html index 9a8d005aeb..f956342f69 100644 --- a/docs/guides/releases/article.html +++ b/docs/guides/releases/article.html @@ -7,7 +7,7 @@ export class MyDurableObject extends WsServerDurableObject {} export default {fetch: getWsServerDurableObjectFetch('MyDurableObjects')}; -

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll something like this in your wrangler.toml file:

[[durable_objects.bindings]]
+

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll have something like this in your wrangler.toml file:

[[durable_objects.bindings]]
 name = "MyDurableObjects"
 class_name = "MyDurableObject"
 

With this you can now easily connect and synchronize clients using the WsSynchronizer synchronizer. This implementation does not currently store the data between clients, but will soon!

This release also includes the new synchronizer-ws-server-simple module that contains a simple server implementation called WsServerSimple. Without the complications of listeners, persistence, or statistics, this is more suitable to be used as a reference implementation for other server environments.

v5.3

This release is focussed on a few API improvements and quality-of-life changes. These include:

React SSR support

Thanks to contributor Muhammad Muhajir for ensuring that TinyBase runs in server-side rendering environments!

In the persisters module...

All Persister objects now expose information about whether they are loading or saving. To access this Status, use:

These make it possible to track background load and save activities, so that, for example, you can show a status-bar spinner of asynchronous persistence activity.

In the synchronizers module...

Synchronizers are a sub-class of Persister, so all Synchronizer objects now also have:

In the ui-react module...

There are corresponding hooks so that you can build these status changes into a React UI easily:

And correspondingly for Synchronizers:

In addition, this module also now includes hooks for injecting objects into the Provider context scope imperatively, much like the existing useProvideStore hook:

All of these new methods have extensive documentation, each with examples to show how to use them.

Please provide feedback on this new release on GitHub!

v5.2

This release introduces new Persisters for... PostgreSQL! TinyBase now has two new Persister modules:

Conceptually, things behave in the same way as they do for the various SQLite persisters. Simply use the createPostgresPersister function (or the similar createPglitePersister function) to persist your TinyBase data:

import postgres from 'postgres';
diff --git a/docs/guides/releases/index.html b/docs/guides/releases/index.html
index 92e81b5d27..bf9124bf62 100644
--- a/docs/guides/releases/index.html
+++ b/docs/guides/releases/index.html
@@ -7,7 +7,7 @@
 export class MyDurableObject extends WsServerDurableObject {}
 
 export default {fetch: getWsServerDurableObjectFetch('MyDurableObjects')};
-

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll something like this in your wrangler.toml file:

[[durable_objects.bindings]]
+

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll have something like this in your wrangler.toml file:

[[durable_objects.bindings]]
 name = "MyDurableObjects"
 class_name = "MyDurableObject"
 

With this you can now easily connect and synchronize clients using the WsSynchronizer synchronizer. This implementation does not currently store the data between clients, but will soon!

This release also includes the new synchronizer-ws-server-simple module that contains a simple server implementation called WsServerSimple. Without the complications of listeners, persistence, or statistics, this is more suitable to be used as a reference implementation for other server environments.

v5.3

This release is focussed on a few API improvements and quality-of-life changes. These include:

React SSR support

Thanks to contributor Muhammad Muhajir for ensuring that TinyBase runs in server-side rendering environments!

In the persisters module...

All Persister objects now expose information about whether they are loading or saving. To access this Status, use:

These make it possible to track background load and save activities, so that, for example, you can show a status-bar spinner of asynchronous persistence activity.

In the synchronizers module...

Synchronizers are a sub-class of Persister, so all Synchronizer objects now also have:

In the ui-react module...

There are corresponding hooks so that you can build these status changes into a React UI easily:

And correspondingly for Synchronizers:

In addition, this module also now includes hooks for injecting objects into the Provider context scope imperatively, much like the existing useProvideStore hook:

All of these new methods have extensive documentation, each with examples to show how to use them.

Please provide feedback on this new release on GitHub!

v5.2

This release introduces new Persisters for... PostgreSQL! TinyBase now has two new Persister modules:

Conceptually, things behave in the same way as they do for the various SQLite persisters. Simply use the createPostgresPersister function (or the similar createPglitePersister function) to persist your TinyBase data:

import postgres from 'postgres';
diff --git a/releases.md b/releases.md
index 31fe4e7e20..122da4bee3 100644
--- a/releases.md
+++ b/releases.md
@@ -12,7 +12,7 @@ export class MyDurableObject extends WsServerDurableObject {}
 export default {fetch: getWsServerDurableObjectFetch('MyDurableObjects')};
 ```
 
-

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll something like this in your wrangler.toml file:

+

For the above code to work, you'll need to have a Wrangler configuration that connects the MyDurableObject class to the MyDurableObjects namespace. In other words, you'll have something like this in your wrangler.toml file:

```toml [[durable_objects.bindings]] diff --git a/site/guides/14_releases.md b/site/guides/14_releases.md index 89c1db54d5..3a957f2f18 100644 --- a/site/guides/14_releases.md +++ b/site/guides/14_releases.md @@ -25,7 +25,7 @@ export default {fetch: getWsServerDurableObjectFetch('MyDurableObjects')}; For the above code to work, you'll need to have a Wrangler configuration that connects the `MyDurableObject` class to the `MyDurableObjects` namespace. In -other words, you'll something like this in your `wrangler.toml` file: +other words, you'll have something like this in your `wrangler.toml` file: ```toml [[durable_objects.bindings]]