React useSearchParam hook
Tracks the browser's location search param.
The React snippet collection contains function components and reusable hooks for React 18.
Tracks the browser's location search param.
Tracks the browser's location hash value, and allows changing it.
Creates a stateful Map
object, and a set of functions to manipulate it.
Enables body scroll locking.
Handles asynchronous calls.
Handles the event of clicking outside of the wrapped component.
Handles the event of clicking inside the wrapped component.
Handles the event of hovering over the wrapped component.
Dynamically loads an external script.
Checks if the code is running on the browser or the server.
Implements fetch()
in a declarative manner.
Returns a stateful value, persisted in localStorage
, and a function to update it.
Creates a stateful Set
object, and a set of functions to manipulate it.
Watches for changes made to the DOM tree, using a MutationObserver
Listens for changes in the pressed state of a given key.
Tracks the dimensions of the browser window.
Executes a callback whenever the window is scrolled.
Executes a callback whenever an event occurs on the global object.
Delays creating a stateful value until some condition is met.
Executes a callback immediately after a component is updated.
Runs an animating function, calling it before every repaint.
Adds an event listener for the specified event type on the given element.
Executes a callback whenever the window is resized.
Creates a portal, allowing rendering of children outside the parent component.