Skip to content
Docs

Command palette

Jump to a page or view, or find a todo by name.

Changelog

react-utils

Small shared React helpers: responsibilities, supported exports and extension points.

Markdown

Purpose

The use-latest subpath stores the latest callback/value in a ref for consumers that need stable subscriptions without stale closures. It has no server capability.

Public exports

SubpathTarget
./use-latest./src/use-latest.ts

These paths come from packages/react-utils/package.json. A . entry is the package root. Conditional targets distinguish platform or type resolution; consumers should import the subpath, not its source file.

How to extend

Use the existing helper for that specific ownership need. Prefer ordinary React state and dependencies when they already express the behavior. Do not turn this package into a miscellaneous barrel.

Read the small shared react helpers guide for the full flow.

Key files

Edit on GitHubDocumentation is in English.