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
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ A lightweight, composable and explicit reactivity system.
14
14
## Features
15
15
16
16
<details>
17
-
<summary>Plain reactivity. No proxies, no magic.</summary>
17
+
<summary>⚡ Plain reactivity. No proxies, no magic.</summary>
18
18
19
19
It does not convert the value with `Object.defineProperty` nor `Proxy`. Keeping everything as plain JavaScript value makes it easier to work with other libraries and easier for the JavaScript engine to optimize.
20
20
@@ -31,7 +31,7 @@ setCount(1);
31
31
</details>
32
32
33
33
<details>
34
-
<summary>Explicit reactivity. No hidden dependencies, no surprises.</summary>
34
+
<summary>🔍 Explicit reactivity. No hidden dependencies, no surprises.</summary>
35
35
36
36
Unlike signal-based libraries, `@embra/reactivity` does not automatically track dependencies. You explicitly define what to watch and how to react to changes. This is easier to reason about dependencies and also reduce the cost of complex implicit dependency calculation.
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.
70
70
@@ -96,9 +96,9 @@ count2$.set(2);
96
96
</details>
97
97
98
98
<details>
99
-
<summary>Flexible abstractions of state and actions.</summary>
99
+
<summary>🧩 Flexible abstractions of state and actions.</summary>
100
100
101
-
In the days of Flux model, we often used a single store to hold the state and actions to mutate the state. This was nice for reasoning about the state, but it also introduced a lot of boilerplate code.
101
+
In the days of Flux reducer model, we often used a single store to hold the state and actions to mutate the state. This was nice for reasoning about the state, but it also introduced a lot of boilerplate code.
102
102
103
103
Later on, a pattern with state and action glued together was introduced, like `redux-actions`. `@embra/reactivity` takes this a step further by providing a more simple and flexible abstraction of state and actions.
104
104
@@ -124,23 +124,25 @@ trace(count$);
124
124
</details>
125
125
126
126
<details>
127
-
<summary>Framework agnostic. First-class support for React.</summary>
127
+
<summary>🏗️ Framework agnostic. First-class support for React.</summary>
128
128
129
129
`@embra/reactivity` is designed to be framework agnostic. It can be used with any framework or library that supports JavaScript. It also provides first-class support for React.
0 commit comments