Skip to content

Support for untrackedValue or similar alternative #4

@NabilaWorks

Description

@NabilaWorks

Hi!

This framework looks very interesting!

We are currently using signals in MojiKit and we would like to migrate the whole project to the solid framework.

We are using .untrackedValue heavily to avoid subscribing to the changes in many places, which is a convenience extension for untracked

/// Signal extensions
extension ReadonlySignalUntrackedValueUtils<T> on ReadonlySignal<T> {
  /// Runs a callback function that returns the signal value without
  /// subscribing to the signal updates.
  ///
  /// ```dart
  /// final counter = signal(0);
  /// final untrackedValue = counter.untrackedValue;
  /// ```
  T get untrackedValue => untracked(() => value);
}

Is there something similar that we can currently use in solid ?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions