@liveblocks/react 0.16.1 → 0.16.2
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/{lib/esm → esm}/index.js
RENAMED
|
@@ -37,7 +37,7 @@ function RoomProvider({
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const client = useClient();
|
|
40
|
-
const [room, setRoom] = React.useState(client.enter(id, {
|
|
40
|
+
const [room, setRoom] = React.useState(() => client.enter(id, {
|
|
41
41
|
defaultPresence: defaultPresence ? defaultPresence() : void 0,
|
|
42
42
|
defaultStorageRoot,
|
|
43
43
|
DO_NOT_USE_withoutConnecting: typeof window === "undefined"
|
|
@@ -37,7 +37,7 @@ function RoomProvider({
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
const client = useClient();
|
|
40
|
-
const [room, setRoom] = React.useState(client.enter(id, {
|
|
40
|
+
const [room, setRoom] = React.useState(() => client.enter(id, {
|
|
41
41
|
defaultPresence: defaultPresence ? defaultPresence() : void 0,
|
|
42
42
|
defaultStorageRoot,
|
|
43
43
|
DO_NOT_USE_withoutConnecting: typeof window === "undefined"
|
|
File without changes
|
|
@@ -105,11 +105,13 @@ function RoomProvider(_ref) {
|
|
|
105
105
|
|
|
106
106
|
var client = useClient();
|
|
107
107
|
|
|
108
|
-
var _React$useState = React__namespace.useState(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
var _React$useState = React__namespace.useState(function () {
|
|
109
|
+
return client.enter(id, {
|
|
110
|
+
defaultPresence: defaultPresence ? defaultPresence() : undefined,
|
|
111
|
+
defaultStorageRoot: defaultStorageRoot,
|
|
112
|
+
DO_NOT_USE_withoutConnecting: typeof window === "undefined"
|
|
113
|
+
});
|
|
114
|
+
}),
|
|
113
115
|
room = _React$useState[0],
|
|
114
116
|
setRoom = _React$useState[1];
|
|
115
117
|
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liveblocks/react",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
4
4
|
"description": "A set of React hooks and providers to use Liveblocks declaratively.",
|
|
5
|
-
"main": "./
|
|
6
|
-
"types": "./
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
7
|
"files": [
|
|
8
|
-
"
|
|
8
|
+
"**"
|
|
9
9
|
],
|
|
10
10
|
"exports": {
|
|
11
11
|
"./package.json": "./package.json",
|
|
12
12
|
".": {
|
|
13
|
-
"types": "./
|
|
14
|
-
"module": "./
|
|
15
|
-
"import": "./
|
|
16
|
-
"default": "./
|
|
13
|
+
"types": "./index.d.ts",
|
|
14
|
+
"module": "./esm/index.js",
|
|
15
|
+
"import": "./esm/index.mjs",
|
|
16
|
+
"default": "./index.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"url": "https://github.com/liveblocks/liveblocks/issues"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "rollup -c",
|
|
30
|
+
"build": "rollup -c && cp ./package.json ./README.md ./lib",
|
|
31
31
|
"start": "rollup -c -w",
|
|
32
32
|
"test": "jest --watch"
|
|
33
33
|
},
|
|
34
34
|
"license": "Apache-2.0",
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@liveblocks/client": "0.16.
|
|
36
|
+
"@liveblocks/client": "0.16.2",
|
|
37
37
|
"react": "^16.14.0 || ^17 || ^18"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|