teamplay 0.1.12 → 0.1.13
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/package.json +8 -8
- package/react/helpers.js +2 -2
- package/react/universal$.js +2 -1
- package/react/universalSub.js +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "teamplay",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Full-stack signals ORM with multiplayer",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@nx-js/observer-util": "^4.1.3",
|
|
26
|
-
"@teamplay/backend": "^0.1.
|
|
27
|
-
"@teamplay/cache": "^0.1.
|
|
28
|
-
"@teamplay/channel": "^0.1.
|
|
29
|
-
"@teamplay/debug": "^0.1.
|
|
30
|
-
"@teamplay/schema": "^0.1.
|
|
31
|
-
"@teamplay/utils": "^0.1.
|
|
26
|
+
"@teamplay/backend": "^0.1.13",
|
|
27
|
+
"@teamplay/cache": "^0.1.13",
|
|
28
|
+
"@teamplay/channel": "^0.1.13",
|
|
29
|
+
"@teamplay/debug": "^0.1.13",
|
|
30
|
+
"@teamplay/schema": "^0.1.13",
|
|
31
|
+
"@teamplay/utils": "^0.1.13",
|
|
32
32
|
"diff-match-patch": "^1.0.5",
|
|
33
33
|
"events": "^3.3.0",
|
|
34
34
|
"json0-ot-diff": "^1.1.2",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
]
|
|
64
64
|
},
|
|
65
65
|
"license": "MIT",
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1abacbe2dd704f77dfa20d061edf89490ac65cee"
|
|
67
67
|
}
|
package/react/helpers.js
CHANGED
package/react/universal$.js
CHANGED
|
@@ -9,7 +9,8 @@ export default function universal$ ($root, value) {
|
|
|
9
9
|
const id = executionContextTracker.newHookId()
|
|
10
10
|
const $signal = $($root, value, id)
|
|
11
11
|
// save signal into ref to make sure it's not garbage collected while component exists
|
|
12
|
-
useRef(
|
|
12
|
+
const $signalRef = useRef() // eslint-disable-line react-hooks/rules-of-hooks
|
|
13
|
+
if ($signalRef.current !== $signal) $signalRef.current = $signal
|
|
13
14
|
return $signal
|
|
14
15
|
} else {
|
|
15
16
|
return $($root, value)
|
package/react/universalSub.js
CHANGED
|
@@ -10,7 +10,8 @@ export default function universalSub (...args) {
|
|
|
10
10
|
// 1. if it's a promise, throw it so that Suspense can catch it and wait for subscription to finish
|
|
11
11
|
if (promiseOrSignal.then) throw promiseOrSignal
|
|
12
12
|
// 2. if it's a signal, we save it into ref to make sure it's not garbage collected while component exists
|
|
13
|
-
useRef(
|
|
13
|
+
const $signalRef = useRef() // eslint-disable-line react-hooks/rules-of-hooks
|
|
14
|
+
if ($signalRef.current !== promiseOrSignal) $signalRef.current = promiseOrSignal
|
|
14
15
|
}
|
|
15
16
|
return promiseOrSignal
|
|
16
17
|
}
|