Skip to main content
Home

Built and signed on GitHub Actions

Utility functions and hooks for a variety of React-style frameworks.

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year ago (0.4.0)
f
cls

Combines class specifiers into a single class string, for use in class attributes in HTML or JSX.

f
createUseIds

Creates a hook that will infinitely generate unique IDs that are stable for the lifetime of the component. This is typically used for <label for="..."> and <input id="..."> pairs.

f
createUseInitRef

Creates a hook that will return a ref object like useRef, but is initialized with a value from a callback function. Useful for when you need to initialize a ref with a value that would be expensive to compute on every render.

f
N
createUseLocalStorage

Creates a hook that acts like useState, but serializes sets to localStorage, and deserializes initial values from it on first load.

v
createUseLocalStorage.types
No documentation available
f
setFloat

Returns an event handler that will call the callback with the value of the target element as a float. If the value is not a valid float, the callback will not be called, unless orElse is provided, in which case the callback will be called with that value.

f
setInteger

Returns an event handler that will call the callback with the value of the target element as a integer. If the value is not a valid integer, the callback will not be called, unless orElse is provided, in which case the callback will be called with that value.

f
setString

Returns an event handler that will call the callback with the value of the target element. This is mainly used for input onChange events.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.