Notes on JavaScript, TypeScript, React and the Node side of things — written while building.
Most LLM tools run on the server and hand back data. Leave out the execute function and the AI SDK forwards the call to the browser instead, where it can do things the server cannot — switch the theme, scroll to a section, restart an animation. Here is the whole loop, from the route handler to useChat and back.
Closures are a powerful concept in JavaScript, allowing functions to retain access to variables from their outer scope even after the function has executed. Learn how closures work with simple examples.
Learn how to set up a TypeScript project with ts-node-dev for faster development, including key TypeScript concepts like rest operators, generics, and utility types. This guide will help you streamline your workflow and write efficient code.
React Hooks simplify lifecycle management compared to class components, enclosing mounting and unmounting logic. Custom Hooks let you reuse logic across components by conventionally starting the hook name with "use" for better readability.
Mongoose is a schema-based MongoDB wrapper for Node.js, offering built-in type casting, validation, and query building. Express.js is a minimalist Node.js web framework, while JWT is used for secure communication and managing authorization.
Learn how to add custom gaps, dots, and navigation buttons to your Next.js testimonial slider using global.css. This guide covers essential settings and provides styling tips for creating a customized slider experience with React and slick-carousel.