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.
Handles asynchronous calls.
Enables body scroll locking.
Creates a stateful Map
object, and a set of functions to manipulate it.
Handles the event of clicking inside the wrapped component.
Handles the event of clicking outside of the wrapped component.
Handles the event of hovering over the wrapped component.
Dynamically loads an external script.
Implements fetch()
in a declarative manner.
Checks if the code is running on the browser or the server.
Returns a stateful value, persisted in localStorage
, and a function to update it.
Listens for changes in the pressed state of a given key.
Watches for changes made to the DOM tree, using a MutationObserver
Creates a stateful Set
object, and a set of functions to manipulate it.
Tracks the dimensions of the browser window.
Executes a callback immediately after a component is updated.
Delays creating a stateful value until some condition is met.
Executes a callback whenever an event occurs on the global object.
Executes a callback whenever the window is scrolled.
Adds an event listener for the specified event type on the given element.
Runs an animating function, calling it before every repaint.
Executes a callback whenever the window is resized.
Creates a stateful value, returning a getter and a setter function.