@solidjs/signals 2.0.0-beta.13 → 2.0.0-beta.15
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 +4 -6
- package/dist/dev.js +376 -217
- package/dist/node.cjs +1634 -1528
- package/dist/prod.js +1400 -1299
- package/dist/types/core/core.d.ts +6 -22
- package/dist/types/core/dev.d.ts +1 -1
- package/dist/types/core/index.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/store/index.d.ts +1 -1
- package/dist/types/store/projection.d.ts +2 -2
- package/dist/types/store/store.d.ts +7 -2
- package/dist/types-cjs/core/core.d.cts +6 -22
- package/dist/types-cjs/core/dev.d.cts +1 -1
- package/dist/types-cjs/core/index.d.cts +1 -1
- package/dist/types-cjs/index.d.cts +1 -1
- package/dist/types-cjs/store/index.d.cts +1 -1
- package/dist/types-cjs/store/projection.d.cts +2 -2
- package/dist/types-cjs/store/store.d.cts +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,10 +107,9 @@ const data = createMemo(async () => {
|
|
|
107
107
|
return response.json();
|
|
108
108
|
});
|
|
109
109
|
|
|
110
|
-
// Check async state
|
|
111
|
-
isPending(data); // true while
|
|
112
|
-
|
|
113
|
-
latest(data); // last resolved value
|
|
110
|
+
// Check async state for this read
|
|
111
|
+
isPending(data); // true while this read touches pending async work
|
|
112
|
+
latest(data); // last resolved value; follows the not-ready path if no value has resolved yet
|
|
114
113
|
```
|
|
115
114
|
|
|
116
115
|
Use `action()` to coordinate async workflows with the reactive graph:
|
|
@@ -225,9 +224,8 @@ createRoot(dispose => {
|
|
|
225
224
|
| `flush()` | Process all pending updates |
|
|
226
225
|
| `untrack(fn)` | Run `fn` without tracking dependencies |
|
|
227
226
|
| `isPending(accessor)` | Check if an async accessor is revalidating stale data |
|
|
228
|
-
| `latest(accessor)` | Get the last resolved value
|
|
227
|
+
| `latest(accessor)` | Get the last resolved value, or follow not-ready if none exists |
|
|
229
228
|
| `refresh(accessor)` | Re-trigger an async computation |
|
|
230
|
-
| `isRefreshing(accessor)` | Check if an async accessor is refreshing |
|
|
231
229
|
| `resolve(fn)` | Returns a promise that resolves when a reactive expression settles |
|
|
232
230
|
| `mapArray(list, mapFn)` | Reactive array mapping with keyed reconciliation |
|
|
233
231
|
| `repeat(count, mapFn)` | Reactive repeat based on a reactive count |
|