Skip to content

Computed signal is evaluated twice when creating a binding #23966

Closed

Description

@Legioth

Description of the bug

It seems like the value of a computed signal is accessed twice when creating a signal binding.

Expected behavior

Signal should be read only once.

Minimal reproducible example

@Route
public class MainView extends VerticalLayout {
    private ValueSignal<String> signal = new ValueSignal<>("Hello");
    
    public MainView() {
        Span span = new Span();
        
        System.out.println("Creating binding");
        span.bindText(() -> {
            System.out.println("Computing");
            return signal.get();
        });
        System.out.println("Created binding");
        
        add(span);
    }
}

Versions

  • Vaadin / Flow version: Vaadin 25.1.0-rc2

Activity

  1. added a commit that references this issue on Mar 24, 2026
    0176137
  2. added theissue type on Mar 24, 2026
  3. added 2 commits that reference this issue on Mar 25, 2026
    c6bd599
    425d946
  4. added a commit that references this issue on Mar 25, 2026
    c0b627f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions