The React snippet collection contains function components and reusable hooks for React 18.
Creates a stateful Map
object, and a set of functions to manipulate it.
React, Hooks · Nov 6, 2021
Tracks the browser's location hash value, and allows changing it.
React, Hooks · Oct 2, 2021
Handles the event of clicking inside the wrapped component.
React, Hooks · Nov 16, 2020
Handles the event of clicking outside of the wrapped component.
React, Hooks · Nov 16, 2020
Handles the event of hovering over the wrapped component.
React, Hooks · Oct 5, 2021
Returns a stateful value, persisted in localStorage
, and a function to update it.
React, Hooks · Oct 13, 2021
Creates a stateful Set
object, and a set of functions to manipulate it.
React, Hooks · Nov 1, 2021
Checks if the code is running on the browser or the server.
React, Hooks · Mar 10, 2021
Delays creating a stateful value until some condition is met.
React, Hooks · Dec 15, 2021
Watches for changes made to the DOM tree, using a MutationObserver
React, Hooks · Nov 23, 2021