@volynets/reflex 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# `@
|
|
1
|
+
# `@volynets/reflex`
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@volynets/reflex)
|
|
4
|
+
[](https://www.npmjs.com/package/@volynets/reflex)
|
|
5
5
|
[](https://github.com/volynetstyle/Reflex/blob/main/packages/reflex/LICENSE)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
[](https://github.com/volynetstyle/Reflex)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Small signal-style reactivity on top of the Reflex runtime.
|
|
14
14
|
|
|
15
|
-
`@
|
|
15
|
+
`@volynets/reflex` is the product-facing API for building reactive state, derived values, effects, and event-driven state without dropping down to the lower-level runtime primitives.
|
|
16
16
|
|
|
17
17
|
It gives you:
|
|
18
18
|
|
|
@@ -24,18 +24,17 @@ It gives you:
|
|
|
24
24
|
Under the hood it is built on:
|
|
25
25
|
|
|
26
26
|
- [`@reflex/runtime`](https://github.com/volynetstyle/Reflex/tree/main/packages/%40reflex/runtime) for reactive execution
|
|
27
|
-
- [`@reflex/core`](https://github.com/volynetstyle/Reflex/tree/main/packages/%40reflex/core) for lower-level infrastructure
|
|
28
27
|
|
|
29
28
|
## Install
|
|
30
29
|
|
|
31
30
|
```bash
|
|
32
|
-
npm install @
|
|
31
|
+
npm install @volynets/reflex
|
|
33
32
|
```
|
|
34
33
|
|
|
35
34
|
## Quick Start
|
|
36
35
|
|
|
37
36
|
```ts
|
|
38
|
-
import { computed, createRuntime, effect, signal } from "@
|
|
37
|
+
import { computed, createRuntime, effect, signal } from "@volynets/reflex";
|
|
39
38
|
|
|
40
39
|
const rt = createRuntime();
|
|
41
40
|
|
|
@@ -83,7 +82,7 @@ The top-level primitives are not methods on `rt`, but they are still runtime-bac
|
|
|
83
82
|
### Signals and derived values
|
|
84
83
|
|
|
85
84
|
```ts
|
|
86
|
-
import { computed, createRuntime, memo, signal } from "@
|
|
85
|
+
import { computed, createRuntime, memo, signal } from "@volynets/reflex";
|
|
87
86
|
|
|
88
87
|
createRuntime();
|
|
89
88
|
|
|
@@ -106,7 +105,7 @@ console.log(warmed()); // 290
|
|
|
106
105
|
### Events and accumulated state
|
|
107
106
|
|
|
108
107
|
```ts
|
|
109
|
-
import { computed, createRuntime, effect, hold, scan } from "@
|
|
108
|
+
import { computed, createRuntime, effect, hold, scan } from "@volynets/reflex";
|
|
110
109
|
|
|
111
110
|
const rt = createRuntime();
|
|
112
111
|
const updates = rt.event<number>();
|
|
@@ -141,7 +140,7 @@ import {
|
|
|
141
140
|
map,
|
|
142
141
|
merge,
|
|
143
142
|
subscribeOnce,
|
|
144
|
-
} from "@
|
|
143
|
+
} from "@volynets/reflex";
|
|
145
144
|
|
|
146
145
|
const rt = createRuntime();
|
|
147
146
|
const clicks = rt.event<number>();
|