@vaadin/hilla-react-signals
Advanced tools
Comparing version
@@ -0,1 +1,2 @@ | ||
import { nanoid } from "nanoid"; | ||
import { NumberSignal, setInternalValue } from "./Signals.js"; | ||
@@ -10,3 +11,3 @@ import SignalsHandler from "./SignalsHandler"; | ||
constructor(signalProviderServiceMethod, connectClient) { | ||
this.#id = crypto.randomUUID(); | ||
this.#id = nanoid(); | ||
this.#signalsHandler = new SignalsHandler(connectClient); | ||
@@ -13,0 +14,0 @@ this.#channelDescriptor = { |
{ | ||
"name": "@vaadin/hilla-react-signals", | ||
"version": "24.5.0-alpha7", | ||
"version": "24.5.0-alpha8", | ||
"description": "Signals for Hilla React", | ||
@@ -50,3 +50,4 @@ "main": "index.js", | ||
"@preact/signals-react": "^2.0.0", | ||
"@vaadin/hilla-frontend": "24.5.0-alpha7" | ||
"@vaadin/hilla-frontend": "24.5.0-alpha8", | ||
"nanoid": "^5.0.7" | ||
}, | ||
@@ -53,0 +54,0 @@ "peerDependencies": { |
@@ -0,1 +1,2 @@ | ||
import { nanoid } from "nanoid"; | ||
import { Signal } from "./core.js"; | ||
@@ -35,3 +36,3 @@ import { StateEventType } from "./types"; | ||
set value(value) { | ||
const id = crypto.randomUUID(); | ||
const id = nanoid(); | ||
this.#setInternalValue(value); | ||
@@ -38,0 +39,0 @@ this.#publish({ id, type: StateEventType.SET, value }).catch((error) => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
24312
0.56%287
0.7%5
25%+ Added
+ Added
+ Added
- Removed