Skip to main content

Pointers

Sometimes, you will need to return cells inside .map compute functions. cells manages this automatically with pointers.

const cellA = proxy.new(...);
const cellB = proxy.new(...);

// pointerCell will either be cellA or cellB
const pointerCell = proxy.map([cellA, cellB], (a, b) =>
condition ? cellA : cellB
);

// breathe normally
await pointerCell.get();
pointerCell.map(...);