cytoplasmic
    Preparing search index...

    Function Deref

    • Dereference a nullable cell.

      Type Parameters

      • T

      Parameters

      • props: {
            children: (value: Cell<T>) => ElementChildren;
            else?: ElementChildren;
            ref: Cell<undefined | null | T>;
        }
        • children: (value: Cell<T>) => ElementChildren

          A function that accepts the non-nullable value and returns an element.

        • Optionalelse?: ElementChildren

          Optional element to render if the cell value is null or undefined.

        • ref: Cell<undefined | null | T>

          The cell to dereference.

      Returns Element

      const num = ref<number>();

      <Deref ref={num}>{ num =>
      {num.map(n => n + 5)} is ten
      }</Deref>