Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
From Vibe Coding to Deliberation-First Coding with AI
You give the Agent a prompt.
-
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.
-
How GenAI is shifting architecture left
-
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.
-
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.
-
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.
-
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).
-
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.…
-
Handling the React server hydration mismatch error
I was recently working on a React component in a shared component library.
-
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.
-
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…
-
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.
-
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.
-
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).
-
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…
-
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.
-
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.
-
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.
-
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
-
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.
-
How to create an SVG gradient loading spinner
I recently got to work on a different type of project than I normally tackle.
-
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.
-
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.
-
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/).
-
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.
-
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.
-
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.
-
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).
-
Tools to catch accessibility errors in JavaScript applications
I've learned a lot about accessibility these last 2 years working at Stitch Fix.
-
Catch warnings in Jest tests
-
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.
-
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.
-
Picking the right React component pattern
A few months ago I wrote about [React custom Hooks vs.
-
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.
-
Looping in React
Last week I talked about 6 different ways to [conditional render JSX markup within a React component](/blog/conditional-rendering-react/).
-
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…
-
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.
-
Using Jest mock functions in TypeScript
-
25 VS Code extensions for max productivity
Next week, April 29th will be [Visual Studio Code](https://code.visualstudio.com/)'s 6th birthday!
-
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).
-
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/).
-
Quickie fetch timeout
-
Copy to clipboard React custom Hook
-
Create an object lookup from an array of JavaScript objects
-
Auto-generate React PropTypes from TypeScript components
One of the reasons I enjoy writing React in TypeScript is using static types for component props.
-
Sync to localStorage with React useReducer Hook
In my last post on [React custom Hooks vs.
-
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).
-
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.
-
8 helpful custom React Hooks
Custom React Hooks allow us to extract component logic into reusable functions.
-
Prettier + ESLint = ❤️