Gets the current value of the cell. The component is re-rendered when the cell value changes.
the type of the value that the cell caries.
The cell to use.
The current value of the cell.
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.
useCellValues
const cell$ = Cell(0)//...function MyComponent() { const cell = useCellValue(cell$) return <div>{cell}</div>} Copy
const cell$ = Cell(0)//...function MyComponent() { const cell = useCellValue(cell$) return <div>{cell}</div>}
Gets the current value of the cell. The component is re-rendered when the cell value changes.