This site runs best with JavaScript enabled.

How to test API calls

Hey everyone, recently I've seen a couple of questions regarding testing in the JavaScript ecosystem. Some of the questions are: How to test API calls? How to test axios? How test API calls fired from a useEffect hook? How to test API calls from React Query? During this blog post, I'll give you all…

Read Article →

Adding authentication to Next.js with Auth0

Setting authentication in Next.js apps can be stressing and confusing. To make your life easier, Auth0 created an SDK that makes this process simpler and fast. In this blog post, I'll show you how to add authentication to your Next.js application using the Auth0 SDK, how to display the…

Read Article →

Portfolio Project Club: Setting up a NextJS app

Hey everyone, this is the first blog post about the technical implementation regarding the ShareYourContent app for the Portfolio Project Club. This app will include the following things: Next.js, Tailwind CSS, TypeScript, React Testing Library and Cypress. Next.js and Tailwind CSS template For…

Read Article →

Git Aliases

Are you constantly repeating the same Git command or sequence of commands? Do you wish that it would be faster and easier to type those commands? With Git Aliases you can do it. In this short blog post, I'll introduce Git Aliases, show you how to configure them, and give you a list of my commonly…

Read Article →

Configuring Mock Service Worker (MSW)

Are you building an app where you don't have your backend implementation yet? Are you tired of maintaining a dedicated mock server? Do you find that mocking fetch or axios causes more problems in your tests than it fixes? Then you should probably consider starting using Mock Service Worker (MSW…

Read Article →

Modern Search Engine Optimization (SEO) Notes

Hey everyone, as I'm starting to turn my blog into a digital garden. I've decided to start making public my notes from various courses or subjects. This post will contain the notes I took while watching the Modern Search Engine Optimization (SEO) course on FrontendMasters . Traditional SEO It's…

Read Article →

React Authentication made easy with useAuth0

Authentication is hard! Nowadays, to create a simple login or logout feature, we require a considerable amount of boilerplate code. Now picture we want to add authentication with Google or Facebook? More boilerplate, right? What if I told you that in React you can do that just by wrapping your code…

Read Article →

Daniel Afonso © 2021