This is a collection of code snippets I've used in the past and saved. Some are Serverless Functions, which include set up instructions. Others are anything from random CSS snippets to Node.js scripts.
A modified “useState” hook that uses localStorage to remember state across sessions.
A React-friendly alternative to window.setInterval
Avoid SSR issues with this handy React hook. Know whether you're rendering on the client or server!
React hook for axios
Update MDX Meta
Change last updated time.
A tiny, secure, URL-friendly, unique string ID generator
Accept a payment.
Create a slash command.
Generate an array of numbers, for happy iteration
Send an email to a user.
React Hook for nprogress.
Quickly query your hasura database.
Page views over a given range.
Read data from Realtime Database.
A classic debounce function, written in modern JS.
CRUD API Route
For use with Next.js.