#react
24 posts tagged react. All posts
Five ways to add search to a website: Algolia, Fuse.js, Google, PHP and PagefindWorking examples of site search with Algolia, Fuse.js in React, Google Programmable Search, a PHP and MySQL query, and Pagefind for static sites.
Keeping an element above the fold in React with refs and getBoundingClientRectMeasure where an element ends up on the page with a React ref and getBoundingClientRect, then shift it up with a negative top offset so it stays above the fold.
Getting started with react-spring: useSpring and useTrail examplesThree small react-spring examples (a fade-in, a slide and a staggered trail) using the current @react-spring/web package and the .to() API.
Six ChatGPT prompts I use for code review, commit messages and blog draftsCopy-paste ChatGPT prompts for rewriting code to a style guide, writing tests, explaining code, writing commit messages and test notes, and drafting blog posts.
An endless road animation for a car in React and CSSMake a car look like it is driving forever by scrolling dashed road markings with a CSS keyframe animation inside a small React component.
How I implemented a stock screener in Python, part II: the scannersThe JSON config and two yfinance scanners from my stock screener: one flags big high-low ranges, the other finds liquid penny stocks and posts to Discord.
A React image component with a loading skeleton and fallback imageBuild a React image component that shows a shimmer skeleton while the image loads and swaps to a fallback image if it fails, without error loops.
Node.js 18: built-in fetch and the node:test runnerTwo Node.js 18 additions that replace npm packages: a global fetch() enabled by default, and the built-in node:test test runner.
Building a responsive price card component in ReactHow I built a React price card with an image, nightly price, host and total, then made it responsive with a media query and added a hover zoom in CSS.
CSS-in-JS vs plain CSS in React, with styled-components examplesThe trade-offs between runtime CSS-in-JS and plain CSS or CSS Modules in React, with working styled-components examples and its 2025 maintenance-mode status.
Fade elements in on scroll with CSS transitions and react-intersection-observerUse the useInView hook from react-intersection-observer to add a CSS class when an element scrolls into view, and animate it with a CSS transition.
React class components: state, props, events and lifecycle methodsHow to write React class components with state, props, event handlers, lifecycle methods and TypeScript types, and when you still need one.
Next.js basics: rendering modes, a TypeScript starter app and deploying to VercelWhat Next.js adds on top of React, how to create a TypeScript app with the App Router, the built-in components worth using, and how to deploy it to Vercel.
Sharing state across React components with ContextHow to use createContext and useContext to share state without prop drilling, with counter, theme toggle and viewport-size examples, and how context re-renders work.
React function components: props, hooks, events and TypeScriptWrite React function components, manage state and effects with hooks, handle events and forms, and type props in TypeScript.
React UI libraries and app basics: MUI, React-Bootstrap, routing, Redux and testsAdd MUI or React-Bootstrap to a Vite React app, then wire up controlled forms, React Router, Redux Toolkit, Vitest tests and a Vercel deploy.
Page transitions in Next.js: Motion in the Pages Router, ViewTransition in the App RouterFade between routes in Next.js with Motion's AnimatePresence in the Pages Router, or React's ViewTransition component in the App Router.
Building a scripted chat bot in React with react-simple-chatbotA small scripted "about me" chat bot built with react-simple-chatbot, where each step shows a message or a set of options that decide the next step.
Tracking IPFS files with a Solidity contract and a Drizzle React tableAn old dapp of mine: a Solidity contract that records IPFS hashes and tags per owner, a simple sign-up contract, and a Drizzle React table that lists the files.
A simple collapsible component in React and TypeScriptA small React function component that shows or hides its content when you click the header, with a CSS-only caret and no icon library.
Build a to-do list with Next.js API routes and Neon PostgresA Next.js to-do app with an MUI frontend, SWR data fetching, Pages Router API routes, and a Neon Postgres database accessed through node-postgres.
Overview of corporate landing page done in react with microsoft fabric uimaking a corporate landing page in react
Screenshot utility for mobile appsThis covers how to take screenshots of your mobile app using the ios simulator or android.
How to make a show more component in reactHow I implemented tags for my blog
© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)