Class ComposableReactiveState<V>

java.lang.Object
space.maxus.flare.react.ReactiveState<V>
space.maxus.flare.ui.ComposableReactiveState<V>
Type Parameters:
V - The type of the value this state holds.
All Implemented Interfaces:
ReactiveNotifier<V>

public class ComposableReactiveState<V> extends ReactiveState<V>
Represents a reactive state that is bound to certain composable, and will mark it dirty on each state change.
  • Constructor Details

    • ComposableReactiveState

      public ComposableReactiveState(V value, Composable selfReference)
      Constructs a new ComposableReactiveState.
      Parameters:
      value - The initial value of the state.
      selfReference - The related composable.
  • Method Details

    • set

      public void set(@Nullable V newValue)
      Description copied from class: ReactiveState
      Sets the value of this state
      Overrides:
      set in class ReactiveState<V>
      Parameters:
      newValue - New value to be set
    • getSelfReference

      public Composable getSelfReference()
      Reference to the related composable.