Skip to content

#js

21 posts tagged js. All posts

  1. JavaScript & webKeeping 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.
  2. JavaScript & webGetting 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.
  3. DevOps & toolingStoring PEM keys in cloud environment variables with base64Why multi-line values like PEM keys break in environment variables, and how to base64-encode them in bash and decode them in JavaScript.
  4. JavaScript & webClustering map markers in React Native with superclusterBuild a clustered MapView for react-native-maps with supercluster: group nearby markers, show a count bubble, and zoom in when a cluster is tapped.
  5. JavaScript & webAdd a Google Map with a marker to a web page using the Maps JavaScript APIGet an API key, load the Google Maps JavaScript API, and render a map with an advanced marker in a plain HTML page.
  6. JavaScript & webNetworked Phaser game, part II: the browser clientThe Phaser 2 browser client for a multiplayer pirate ship game: input, Socket.IO sync with the Node server, interpolation, collisions and health.
  7. JavaScript & webMultiplayer Phaser game, part I: the Node.js and Socket.IO serverHow the server for my Phaser pirate-ship game tracks players, bullets, health packs and driftwood, and broadcasts state with Express and Socket.IO.
  8. JavaScript & webDownloading League of Legends match history with Deno and the Riot APIA Deno script that pages through a player's League of Legends match IDs with Riot's match-v5 API, plus why custom games don't show up.
  9. RustFetching Pokémon data from PokeAPI in Rust with reqwest and serdeBuild a small Rust CLI that looks up a Pokémon on PokeAPI, deserializes the JSON with serde, and prints its height, weight, and types.
  10. JavaScript & webA 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.
  11. JavaScript & webNode.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.
  12. JavaScript & webBuilding a command-line app in TypeScript with Commander.jsSet up a TypeScript project, define commands, arguments and options with Commander.js, compile with tsc, and install the result as a runnable CLI.
  13. JavaScript & webWhy JavaScript's Date is painful, and what to use insteadWhere the built-in Date object trips you up with time zones and parsing, and how Intl, Temporal, Moment Timezone and date-fns-tz handle the same conversions.
  14. JavaScript & webSVG wave hero section for an investing homepage with Vue and VuesaxGenerating SVG wave paths in a Vue component, and building an animated wave hero section for an investing blog homepage with Nuxt 2 and Vuesax.
  15. JavaScript & webBuilding 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.
  16. JavaScript & webReact Navigation basics: stacks, params, tabs, deep links and transitionsSet up React Navigation 7 in a React Native app, pass params between screens, nest a stack in tabs, handle deep links and change screen transitions.
  17. JavaScript & webBuild 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.
  18. JavaScript & webAsync JavaScript: promises, async/await and fetchHow promises and async/await work in JavaScript, plus making HTTP requests with fetch, handling errors, cancelling with AbortController and caching responses.
  19. JavaScript & webRunning an Express server in a Docker containerWrite a Dockerfile for a small Express app, build the image, and run it with the port mapped to your machine.
  20. JavaScript & webInstall Node.js and run your first Express serverInstall Node.js on Windows, macOS or Linux, then build a minimal Express 5 server with a start script and static file hosting.
  21. JavaScript & webIntroduction to JavaScript: a free ebook on JS, Node.js and promisesAn introductory ebook on JavaScript, Node.js and asynchronous programming, written in LaTeX and published on Amazon KDP, with a free PDF copy.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)