Function useCellValue

  • Gets the current value of the cell. The component is re-rendered when the cell value changes.

    Type Parameters

    • T

      the type of the value that the cell caries.

    Parameters

    Returns T

    The current value of the cell.

    Remark

    If you need the values of multiple nodes from the realm and those nodes might change in the same computiation, you can useCellValues to reduce re-renders.

    Example

    const cell$ = Cell(0)
    //...
    function MyComponent() {
    const cell = useCellValue(cell$)
    return <div>{cell}</div>
    }

Generated using TypeDoc