Coded Geekery

BlogAboutContact
BlogAboutContact

Code Snippets

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.

useStickyState

useStickyState

A modified “useState” hook that uses localStorage to remember state across sessions.

useInterval

useInterval

A React-friendly alternative to window.setInterval

useHasMounted

useHasMounted

Avoid SSR issues with this handy React hook. Know whether you're rendering on the client or server!

useAxios

useAxios

React hook for axios

Update MDX Meta

Update MDX Meta

Change last updated time.

Tiny ID

Tiny ID

A tiny, secure, URL-friendly, unique string ID generator

Stripe

Stripe

Accept a payment.

Slack

Slack

Create a slash command.

Range

Range

Generate an array of numbers, for happy iteration

Mailgun

Mailgun

Send an email to a user.

Loading Progress

Loading Progress

React Hook for nprogress.

Hasura

Hasura

Quickly query your hasura database.

Google Analytics

Google Analytics

Page views over a given range.

Flybase

Flybase

Read data from Realtime Database.

Debounce

Debounce

A classic debounce function, written in modern JS.

CRUD API Route

CRUD API Route

For use with Next.js.

Coded Geekery

© 2021 Roger Stringer. All rights reserved.

TwitterGitHubInstagram

Stuff

HomeAbout MeContact Me

Not Playing

Spotify

Buy me a coffee

Buy me a coffee