Do Angular signals ignore fast value changes

Discussão em 'Angular' iniciado por Petr Jajtner, Janeiro 7, 2025.

  1. Petr Jajtner

    Petr Jajtner Guest

    Is it possible, that angular signals (and derived computes) ignore some fast value changes? I have websocket and each message from ws is written into signal, but in one moment can come more than hundred messages and signal or effect does not react on this amount of messages and/or react on every let's say 20th message. I'm not sure, but Ang. v18 was OK, but it dramatically changed at v19. Does anybody met this problem? Thanks for your replies or advice

    this.__webSocket.onmessage = (event: MessageEvent) => {
    try {
    const {deserializer} = this.__config;
    deserializer && this.__messagesSg.set(deserializer(event)); // <-- this line
    undefined !== this.__errorSg() && this.__errorSg.set(undefined);
    } catch (error: unknown) {
    void Promise.resolve().then(() => {
    this.__errorSg.set(error);
    });
    }
    };

    Continue reading...

Compartilhe esta Página