You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# vue-subscription
2
2
3
-
A type-safe 🔥, tiny ⭐️ & fast ⚡️ replacement for EventBus / a super-charged ref in Vue 💚. Compatible with Vue 2 ( 2.7.0 and above ) and Vue 3. Provides ESM and Common JS exports.
3
+
A type-safe 🔥 and tiny ⭐️ super-charged ref ⚡️ or eventBus replacement in Vue 💚. Compatible with Vue 2 ( 2.7.0 and above ) and Vue 3. Provides ESM and Common JS exports.
4
4
5
5
Find it on `npm` - https://www.npmjs.com/package/vue-subscription.
6
6
@@ -15,9 +15,9 @@ Find it on `npm` - https://www.npmjs.com/package/vue-subscription.
15
15
16
16
## Introduction
17
17
18
-
This [package](#https://www.npmjs.com/package/vue-subscription) provides a simple way to create reactive subscriptions that can be used to observe changes to a value and execute a list of subscribers when the value changes. It also includes methods to mutate the value and trigger subscribers manually. You can use it as a super charged ref since `$value is not automatically unwrapped in template`.
18
+
Only 1.26 kB or gzip: 0.63 kB in size, the [useSubscription](#tldr) composable takes an initial value and returns an object with a reactive value that is by default shallow and only deep when explicitly enabled. The value property, `$value is not automatically unwrapped in template`. Additionally, it also provides `explicit getter and setter` if you like more control over the state.
19
19
20
-
Only 1.26 kB or gzip: 0.63 kB in size, the [useSubscription](#tldr) composable takes an initial value and returns an object with a reactive value that is by default shallow and only deep when explicitly enabled. In addition to the value property, also provides `explicit getter and setter` if you like more control over the state. Check out the [usage](#usage) examples to learn more.
20
+
The package also provides a simple way to create reactive subscriptions that can be used to observe changes to a value and execute a list of subscribers when the value changes. It also includes methods to mutate the value for complex objects and trigger subscribers manually if and when needed rarely. Check out the [usage](#usage) examples.
21
21
22
22
## Installation
23
23
@@ -38,13 +38,13 @@ const $mySubscription = useSubscription('hello'); // Type will be string
38
38
39
39
### Using in template
40
40
41
-
To display the state in template, you can either use the $value or $get.
41
+
To display the state in template, you can either use the `$read` or `$get`. If you need 2-way data binding you can also use `$value`.
0 commit comments