@device-portal/react 0.0.9 → 0.0.12
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 +3 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -14,6 +14,8 @@ npm install @device-portal/react
|
|
|
14
14
|
|
|
15
15
|
It is expected that the package will be used on two different devices. Create for them two separate pages or apps. Let's call them App A and App B. Both apps will be linked by same `room` (e.g. `'my-test-room'`).
|
|
16
16
|
|
|
17
|
+
> **Note:** The example signaling server `wss://device-portal.filipchalupa.cz` is running on a free instance of render.com, so expect slower startup times if it has been inactive.
|
|
18
|
+
|
|
17
19
|
### One-way Data Flow
|
|
18
20
|
|
|
19
21
|
This is the simplest use case where a `Provider` sends data to one or more `Consumer`s.
|
|
@@ -59,7 +61,7 @@ import { Suspense } from 'react'
|
|
|
59
61
|
|
|
60
62
|
const AppB = () => {
|
|
61
63
|
return (
|
|
62
|
-
<Suspense fallback={<p>Connecting
|
|
64
|
+
<Suspense fallback={<p>Connecting…</p>}>
|
|
63
65
|
<ConsumerComponent />
|
|
64
66
|
</Suspense>
|
|
65
67
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@device-portal/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "Simple WebRTC data channel for React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"build": "npm run build:package && npm run build:storybook",
|
|
18
18
|
"dev:package": "rollup -c -w",
|
|
19
19
|
"build:package": "rollup -c",
|
|
20
|
+
"test:package": "npm run build:package",
|
|
20
21
|
"dev:storybook": "storybook dev -p 6006",
|
|
21
22
|
"build:storybook": "storybook build"
|
|
22
23
|
},
|
|
@@ -38,7 +39,8 @@
|
|
|
38
39
|
"react": "18 || 19"
|
|
39
40
|
},
|
|
40
41
|
"dependencies": {
|
|
41
|
-
"@device-portal/client": "^0.0.
|
|
42
|
+
"@device-portal/client": "^0.0.12",
|
|
43
|
+
"@device-portal/constants": "*"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@babel/core": "^7.24.0",
|
|
@@ -51,7 +53,6 @@
|
|
|
51
53
|
"@rollup/plugin-strip": "^3.0.4",
|
|
52
54
|
"@storybook/addon-docs": "^10.2.10",
|
|
53
55
|
"@storybook/addon-links": "^10.2.10",
|
|
54
|
-
"@storybook/addon-onboarding": "^10.2.10",
|
|
55
56
|
"@storybook/react": "^10.2.10",
|
|
56
57
|
"@storybook/react-vite": "^10.2.10",
|
|
57
58
|
"@tanstack/react-query": "^5.59.20",
|