← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 111
  1. From Vibe Coding to Deliberation-First Coding with AI

    You give the Agent a prompt.

  2. Being Sneaky with GenAI

    The AI hype cycle has convinced us that every app needs a conversational interface, a RAG pipeline, or an autonomous agent.

  3. How GenAI is shifting architecture left

  4. Have We Finally Reached the Mythical "10x Developer"?

    For decades, our industry has been obsessed with the "10x developer" -- that mythical engineer who's supposedly 10 times more productive than the rest of us.

  5. Mock all functions in a JavaScript module except one using Jest

    There are times in a Jest test when we have a module where the majority of the functions need to be mocked, but we have one (or two) that need to be left alone.

  6. Create one-off releases with semantic-release

    I use [`semantic-release`](https://github.com/semantic-release/semantic-release) for both personal and work projects to automate version management and publishing of packages.

  7. Putting test files in the pages folder in a Next.js app

    When developing Next.js apps I want to be able to include other files within the `src/pages` directory besides the [page React components](https://nextjs.org/docs/basic-features/pages) or [API routes](https://nextjs.org/docs/api-routes/introduction).

  8. Avoiding React act warning when accessibility testing next/link with jest-axe

    Recently when adding accessibility tests with [`jest-axe`](https://github.com/nickcolley/jest-axe) to a React component, I ran into the dreaded [`act()` warning](https://reactjs.org/link/wrap-tests-with-act): ```text {11-14} FAIL src/components/Link.test.…

  9. Handling the React server hydration mismatch error

    I was recently working on a React component in a shared component library.

  10. Creating custom generic TypeScript utility types

    I was recently working on my latest project, which uses [Firestore](https://firebase.google.com/) as its NoSQL database.

  11. TypeScript user-defined type guards to the rescue

    Recently I was writing some TypeScript code where I needed to look at the user's preferred languages (using [`Navigator.languages`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/languages)) and compare it against my site's valid locales in or…

  12. React Testing Library best practices

    In my opinion, [ESLint](https://eslint.org/) is one of the best ways to communicate best practices for JavaScript code because it doesn't require everyone to read and follow a document or blog post.

  13. TypeScript React props: interfaces vs type aliases

    The first lesson in my [TypeScript for React Developers minishop](/minishops/typescript-for-react-developers/) is how to define the type of the `props` object passed to React component functions.

  14. Wrapping next/link to use with a custom UI Link component

    [Next.js](https://nextjs.org/) has a pretty snazzy file-system based [router](https://nextjs.org/docs/routing/introduction) that is built on the concept of [pages](https://nextjs.org/docs/basic-features/pages).

  15. What is a DivOps Engineer and what do they do?

    I've written a number of _DivOps_-focused posts ([5 tips for a healthier DivOps setup](/blog/5-tips-healthier-divops-setup/), [50 shades of React rendering with Next.js](/blog/50-shades-react-rendering-nextjs/), and [Auto-generate React PropTypes from Typ…

  16. Learn TypeScript generics by rebuilding existing utility types

    TypeScript's type system is very powerful because it allows us to express types in terms of other types.

  17. How to extract React component logic into a custom Hook

    [React custom Hooks](https://reactjs.org/docs/hooks-custom.html) are kind of like logic helpers for our React components, so that the components themselves can focus on rendering and user interactions.

  18. React useCallback & useMemo use cases

    I went a long while writing React with Hooks without using the [`useCallback()`](https://reactjs.org/docs/hooks-reference.html#usecallback) or [`useMemo()`](https://reactjs.org/docs/hooks-reference.html#usememo) Hooks.

  19. Successfully using async functions in React useEffect

    JavaScript [async functions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function) making dealing with [promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) a bit simpler

  20. Using new-ish & lesser-known JavaScript operators to write concise code

    JavaScript has been around for over 25 years, since May 1995 when [Brendan Eich](http://en.wikipedia.org/wiki/Brendan_Eich) supposedly created it in 10 days.

  21. How to create an SVG gradient loading spinner

    I recently got to work on a different type of project than I normally tackle.

  22. How to shallow clone a JavaScript array

    Usually the rationale for shallow cloning an array is because we want to mutate it, but we need to leave the original unchanged.

  23. Understanding TypeScript generics through lodash functions

    JavaScript is a highly dynamic language, so generics are instrumental in helping us to add types to make our code type safe with TypeScript.

  24. Forwarding refs for a polymorphic React component in TypeScript

    Late last year I wrote about how to develop [Polymorphic React Components in TypeScript](/blog/polymorphic-react-components-typescript/).

  25. Initializing the Firebase Admin Node SDK with env vars

    The [Firebase Admin Node SDK](https://firebase.google.com/docs/admin/setup) is intended to run in a privileged environment.

  26. The non-destructive JavaScript array methods

    In my previous post, we took a deep dive into the [`.reduce()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce) method on the JavaScript Array API.

  27. Learn the Array reduce method by re-implementing lodash functions

    The built-in [JavaScript `Array` object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) has lots of helpful methods that allow us to manipulate arrays.

  28. Exploring the JavaScript Promise API methods

    [ECMAScript 2021](https://ui.dev/es2021/) introduced a new static method to the `Promise` object called [`Promise.any`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/any).

  29. Tools to catch accessibility errors in JavaScript applications

    I've learned a lot about accessibility these last 2 years working at Stitch Fix.

  30. Catch warnings in Jest tests

  31. Creating a React controlled components pattern custom Hook

    Two weeks ago I wrote about [picking the right React component pattern](/blog/picking-right-react-component-pattern/) for shared components that we build.

  32. Extracting TypeScript types from functions, objects & arrays

    A 3rd-party library written in TypeScript likely makes use of lots of internal types to support its API.

  33. Picking the right React component pattern

    A few months ago I wrote about [React custom Hooks vs.

  34. Create a dynamic sitemap with a Next.js API route

    Sitemaps for our apps, blogs or other sites are important because it allows search engines like Google to more intelligently crawl the site.

  35. Looping in React

    Last week I talked about 6 different ways to [conditional render JSX markup within a React component](/blog/conditional-rendering-react/).

  36. Conditional rendering in React

    Because React uses [JSX](https://reactjs.org/docs/introducing-jsx.html) for rendering component UI, and JSX is ["Just JavaScript"™](https://reactjs.org/docs/introducing-jsx.html#jsx-represents-objects) under the hood, there is no special template syntax f…

  37. End-to-end testing with Firebase Emulator and Github Actions

    When running end-to-end (E2E) tests for an application that changes data, we need to have a separate environment in which we can run the tests.

  38. Using Jest mock functions in TypeScript

  39. 25 VS Code extensions for max productivity

    Next week, April 29th will be [Visual Studio Code](https://code.visualstudio.com/)'s 6th birthday!

  40. 50 shades of React rendering with Next.js

    I developed my first [Next.js](https://nextjs.org/) application last November while building [Rep Yo City](https://repyo.city).

  41. 9 single-statement JS algorithms for common data transformations

    Last month I wrote a post on a [shorthand for converting a JavaScript array into an object lookup](/blog/create-object-lookup-array-javascript-objects/).

  42. Quickie fetch timeout

  43. Copy to clipboard React custom Hook

  44. Create an object lookup from an array of JavaScript objects

  45. Auto-generate React PropTypes from TypeScript components

    One of the reasons I enjoy writing React in TypeScript is using static types for component props.

  46. Sync to localStorage with React useReducer Hook

    In my last post on [React custom Hooks vs.

  47. React custom Hooks vs. Mixins

    The last couple of weeks, I've been working on my latest project, [NBA Player Tiers](https://nbaplayertiers.com/) (very much still in-progress).

  48. 5 tips for a healthier DivOps setup

    [DivOps](https://www.divops.dev/), probably more commonly known as Frontend Infrastructure, is all of the tooling needed to set up, maintain, and deploy a modern frontend application.

  49. 8 helpful custom React Hooks

    Custom React Hooks allow us to extract component logic into reusable functions.

  50. Prettier + ESLint = ❤️