Interface ContextualEffectAction

All Superinterfaces:
Serializable
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ContextualEffectAction extends Serializable
Represents a context-aware action to be executed as a signal effect. The action receives an EffectContext that provides information about why the effect is running, such as whether it is the initial execution or whether the change originated from a background context.

Signal effects automatically track dependencies on all signals that are read during the action execution. When any of those signals change, the action is re-run with updated dependencies.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Executes the effect action with the given context, automatically tracking signal dependencies.
  • Method Details

    • execute

      void execute(EffectContext context)
      Executes the effect action with the given context, automatically tracking signal dependencies.
      Parameters:
      context - the effect context providing information about why the effect is running