Module / v1.0.0-beta.13

@typed/react/Hooks

11 unique exports available through this public import path, including their members and aliases.

import * as Hooks from "@typed/react/Hooks";

function

  • prefetch

    function

    Captures the first value for SSR/hydration and closes the temporary subscription before returning.

  • useAction

    function

    Event-driven Effects with refresh status, typed failures, cancellation and unmount cleanup.

  • useAsyncData

    function

    Flattens an Fx of AsyncData, preserving both its state and any source/runtime failures.

  • useEffect

    function

    Observes an Effect after commit. Memoize source expressions whose identity should survive rerenders.

  • useFx

    function

    Observes a Typed Fx. Unmount, source changes and runtime changes interrupt the previous subscription.

  • useRefSubject

    function

    Observes existing Typed state and exposes transactional writes with typed Exit results.

  • useStream

    function

    Observes an Effect Stream, retaining its latest successful emission and complete failure cause.

interface

  • ActionState

    interface

    Latest invocation wins; starting another command interrupts the previous one. All calls settle with Exit.

  • AsyncState

    interface

    Re-runs the current source, retaining the last value while refreshing.

  • ReactiveOptions

    interface

    Defer the first execution until refresh.

  • RefSubjectState

    interface

    Public interface exposed as RefSubjectState from @typed/react/Hooks.