property

GridAtom

Represents a mutable piece of reactive grid state. This atom allows reading, updating, watching, and consuming its value reactively within React components.

get

property

Retrieves the current value stored in the atom. This method provides read access to the state managed by the atom.

Parameters

This function takes no parameters.

Returns

T

set

property

Updates the atom's value. Accepts either a new value or a function that receives the current value and returns the updated value.

Parameters

vT | (p: ) => T

Returns

void

useValue

property

A React hook that subscribes to the atom's value and causes the component to re-render whenever the atom changes.

Parameters

This function takes no parameters.

Returns

T

watch

property

Registers a listener function to be invoked whenever the atom's value changes. Returns a cleanup function to remove the listener.

Parameters

fn() => void

Returns

() => void

property

GridAtomReadonly

Represents an immutable version of a grid atom that supports read, watch, and reactive usage but does not allow updates.

get

property

Retrieves the current value stored in the atom. This method provides read access to the state managed by the atom.

Parameters

This function takes no parameters.

Returns

T

useValue

property

A React hook that subscribes to the atom's value and causes the component to re-render whenever the atom changes.

Parameters

This function takes no parameters.

Returns

T

watch

property

Registers a listener function to be invoked whenever the atom's value changes. Returns a cleanup function to remove the listener.

Parameters

fn() => void

Returns

() => void

property

GridAtomReadonlyUnwatchable

Represents the most minimal read-only version of a grid atom. It supports value retrieval and reactive consumption, but not watching or updates.

get

property

Retrieves the current value stored in the atom. This method provides read access to the state managed by the atom.

Parameters

This function takes no parameters.

Returns

T

useValue

property

A React hook that subscribes to the atom's value and causes the component to re-render whenever the atom changes.

Parameters

This function takes no parameters.

Returns

T