Code Snippets
use-viewport React hook
Get the viewport width and listen for resize events with this React hook.
15 March 2023Formfield React.js component with Tailwind CSS
A React component used for creating simple form fields.
05 January 2022classes
Normalize strings, booleans, null and undefined into a valid React className string
04 September 2021setCookie function
Set a cookie header in a Next.js API.
04 September 2021React setter function
A simple function to update input state.
04 September 2021useSearch React hook
easily search through an array with this hook.
17 April 2021useMounted React hook
Check if your React component has mounted.
04 April 2021usePortal React hook
A simple react hook for creating portals for next.js.
04 April 2021