Skip to content

Commit 2dc59e3

Browse files
committed
docs: update readme
1 parent 963fab4 commit 2dc59e3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ watch(get => {
5959

6060
### 🛡️ Zero-cost ownership model. Type-safe lifecycle management.
6161

62-
In practice, one of the biggest problems we face with reactivity libraries is the lifecycle management of reactive values. `@embra/reactivity` provides a zero-cost ownership model that allows you to create reactive values with explicit ownership.
62+
In practice, one of the biggest problems we encountered with reactivity libraries is the lifecycle management of reactive values. In `@embra/reactivity`, the reactive dependencies are weakly referenced, so generally you don't need to manually dispose of them. However, explicit lifecycle management is still a good practice to avoid unexpected behaviors.
6363

64-
By default, created reactive values are with type `OwnedReadable` or `OwnedWritable`, which exposes a `dispose()` method to clean up the value and its dependencies. When passing the reactive value to a function, you can use `Readable` or `Writable` types to hide the `dispose()` method, ensuring that the value is not disposed of accidentally.
64+
`@embra/reactivity` provides a zero-cost ownership model that allows you to create reactive values with explicit ownership.
65+
66+
By default, created reactive values are with type `OwnedReadable` or `OwnedWritable`, which exposes a `dispose()` method to clear their subscribers. When passing the reactive value to other modules, you can use `Readable` or `Writable` types to hide the `dispose()` method, ensuring that the value is not disposed of accidentally.
6567

6668
```ts
6769
import { writable, readable, type Readable, type OwnedWritable } from "@embra/reactivity";

0 commit comments

Comments
 (0)