DocsBlog

Get Started

Components

Data Grid

Signals

Styling

Theming

↑↓Navigate
↵Select
EscClose
  • 1.8.0

  • Day

    Night

    Preview

    Switch mode
  • cerberus

    acheron

    elysium

    oceanus

Get Started
Components
Data Grid
Signals
Styling
Theming

Get started

OverviewReactivityData FetchingGlobal Stores

Primitives

Creating SignalsCreating QueriesCreating MutationsComputing Signal ValuesCreating EffectsContextual Signal StoresBatch UpdatesCleanup EffectsUntrack Signals

Hooks

Using QueriesUsing MutationsReading Primitive SignalsUsing SignalsUsing Store Instances

Components

Reactive Text

Reading Primitive Signals

Learn how to read primivite signals in React components.

  • source
View as Markdown
Open this page in Markdown
Anthropic
Open in Claude
Ask questions about this page
OpenAI
Open in ChatGPT
Ask questions about this page
import { useRead } from '@cerberus/signals'

Usage

When you want to read a signal value within a component without having fine-grained reactivity.

Note

This is an alternative API to ReactiveText and should only be used in very specific use cases.

Reading State

The useRead hook was created to provide low-level access control for signals. By utilizing this hook, you are opting out of fine-grained reactivity and other performance enhancing benefits.

Warning

This API should be used sparingly and only for very specific use cases where you know what you are doing.

Loading example...

Note

We always recommend utilizing ReactiveText over useRead to provide better control over React rendering in addition to a cleaner DX.

API

useRead accepts the following options:

ParamsRequiredDescription
accessortrueThe signal Accessor value to subscribe to.

Return

useRead returns the latest value of the signal Accessor.

On this page

  • Usage
  • Reading State
  • API
    • Return
Edit this page on Github

Count:

0

Render Count:

0
List Renders: 1