@joshuameiser/utility-functions
v0.0.1
Published
A package containing utility functions that I may need for future projects.
Downloads
6
Readme
Description
This package is a collection of utility functions, which I use from time to time.
List of all functions
disableScrolling
A function, which takes a boolean value and depending on the value enables scrolling or disables it. The function can be used to disable scrolling when opening a modal and re-enabling it when closing it again.
UseMediaQuery
A custom React hook, which takes a query string. It returns whether the query is true or not.
Usually used with something like this:
const Breakpoint1 = useMediaQuery('(min-width: 640px)');