Skip to content

Commit 1072c15

Browse files
committed
docs: remove details
1 parent d2ed5ce commit 1072c15

1 file changed

Lines changed: 8 additions & 31 deletions

File tree

README.md

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ A lightweight, composable and explicit reactivity system.
1313

1414
## Features
1515

16-
<details>
17-
<summary>⚡ Plain reactivity. No proxies, no magic.</summary>
16+
### ⚡ Plain reactivity. No proxies, no magic.
1817

1918
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.
2019

@@ -28,10 +27,7 @@ const [count2$, setCount] = readable(0);
2827
setCount(1);
2928
```
3029

31-
</details>
32-
33-
<details>
34-
<summary>🔍 Explicit reactivity. No hidden dependencies, no surprises.</summary>
30+
### 🔍 Explicit reactivity. No hidden dependencies, no surprises.
3531

3632
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.
3733

@@ -61,10 +57,7 @@ watch(get => {
6157
});
6258
```
6359

64-
</details>
65-
66-
<details>
67-
<summary>🛡️ Zero-cost ownership model. Type-safe lifecycle management.</summary>
60+
### 🛡️ Zero-cost ownership model. Type-safe lifecycle management.
6861

6962
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.
7063

@@ -93,14 +86,11 @@ setCount(1);
9386
count2$.set(2);
9487
```
9588

96-
</details>
97-
98-
<details>
99-
<summary>🧩 Flexible abstractions of state and actions.</summary>
89+
### 🧩 Flexible abstractions of state and actions.
10090

10191
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.
10292

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.
93+
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 simple and flexible abstraction of state and actions.
10494

10595
In the following example, we create a Writable `count$` which looks like a `Writable<number>`, but internally it is derived from a larger application state `appState$`. This allows other modules to depend on a `Writable<number>` without knowing the details of the application state.
10696

@@ -122,10 +112,7 @@ const count$ = toWritable(
122112
trace(count$);
123113
```
124114

125-
</details>
126-
127-
<details>
128-
<summary>⏳ Scheduler mechanism for controlled updates.</summary>
115+
### ⏳ Scheduler mechanism for controlled updates.
129116

130117
`@embra/reactivity` includes a scheduler mechanism and built-in schedulers that lets you control when reactive updates are processed.
131118
This is useful for batching updates and deferring computations.
@@ -153,10 +140,7 @@ const MicrotaskScheduler = asyncScheduler(flush => Promise.resolve().then(flush)
153140
const AnimationFrameScheduler = asyncScheduler(requestAnimationFrame);
154141
```
155142

156-
</details>
157-
158-
<details>
159-
<summary>🏗️ Framework agnostic. First-class support for React.</summary>
143+
### 🏗️ Framework agnostic. First-class support for React.
160144

161145
`@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.
162146

@@ -180,23 +164,16 @@ function Counter({ count$ }) {
180164
}
181165
```
182166

183-
</details>
184-
185-
<details>
186-
<summary>📦 Small bundle size. Focused on performance and simplicity.</summary>
167+
### 📦 Small bundle size. Focused on performance and simplicity.
187168

188169
![export size](https://embrajs.github.io/reactivity/assets/export-size.svg)
189170

190-
</details>
191-
192171
## Install
193172

194173
```bash
195174
npm add @embra/reactivity
196175
```
197176

198-
![export size](https://embrajs.github.io/reactivity/assets/export-size.svg)
199-
200177
## Debugging
201178

202179
### trace

0 commit comments

Comments
 (0)