applesauce-react 0.0.0-next-20250616165757 → 0.0.0-next-20250618165207
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.
|
@@ -2,11 +2,11 @@ import { withImmediateValueOrDefault } from "applesauce-core";
|
|
|
2
2
|
import hash_sum from "hash-sum";
|
|
3
3
|
import { of } from "rxjs";
|
|
4
4
|
import { useEventStore } from "./use-event-store.js";
|
|
5
|
-
import {
|
|
5
|
+
import { useObservableEagerMemo } from "./use-observable-memo.js";
|
|
6
6
|
/** Runs and subscribes to a model on the event store */
|
|
7
7
|
export function useEventModel(factory, args) {
|
|
8
8
|
const store = useEventStore();
|
|
9
|
-
return
|
|
9
|
+
return useObservableEagerMemo(() => {
|
|
10
10
|
if (args)
|
|
11
11
|
return store.model(factory, ...args).pipe(withImmediateValueOrDefault(undefined));
|
|
12
12
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applesauce-react",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250618165207",
|
|
4
4
|
"description": "React hooks for applesauce",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"applesauce-accounts": "^2.0.0",
|
|
53
|
-
"applesauce-actions": "
|
|
53
|
+
"applesauce-actions": "0.0.0-next-20250618165207",
|
|
54
54
|
"applesauce-content": "^2.0.0",
|
|
55
|
-
"applesauce-core": "0.0.0-next-
|
|
55
|
+
"applesauce-core": "0.0.0-next-20250618165207",
|
|
56
56
|
"applesauce-factory": "^2.0.0",
|
|
57
57
|
"hash-sum": "^2.0.0",
|
|
58
58
|
"nostr-tools": "^2.13",
|