As of 2024, Vitest is all the rage for testing. But can we apply what we learned about mocking modules in Jest to Vitest? Absolutely!
Subscribe
Get our best content on how to build better apps.
Subscribe
Get our best content on how to build better apps.
Got product development questions?
Join us on
Discord
The Truth Behind Micro Frontends: Insights from Real Case Studies
When you’re seeking improved manageability for your web application, the idea of breaking down traditional monolithic frontend architectures into smaller, more manageable segments conjures visions of enhanced efficiency and seamless deployment.
Amy Cutlip
Sending Transactional Emails with Remix and Amazon AWS SES
Almost any web app with authenticated users will need to send some emails. You could work around it by using an authenticated service like Auth0 or AWS Incognito, but let’s assume you’ve set up Remix with a stack that ships with built-in authentication.
Ryan Spencer
Developer
How to Generalize Component Props With Type Safety
Creating reusable components is often hindered by excess code accounting for each use case the components need to support. For example, a dropdown that supports text, links, buttons, and even complex components, or a text component that supports multiple different types of HTML tags, in addition to reusable components as well. In both cases, a variety of props will exist for each type of component we pass in that may need to be shared between the parent and child.
Christina Labay
Meet React to Web Component v2
Greetings, dev community! The highly-anticipated release of the new React to Web Component (@R2WC/react-to-web-component) API is here! We have been thrilled by the level of adoption version 1.0 has attained within the developer community. You have provided great feedback in our Discord and GitHub issues on your pain points and the ways in which we can improve R2WC. And we listened!
Bavin Edwards
Mocking Modules in Jest Tests
You’ve probably found your way to this post because you're trying to create mock code for tests that use the Jest framework and are having difficulty getting your mock to work the way you want. This post focuses on why you might choose one Jest method over another to create a mock—and how to use it—so you can work and write tests more quickly.
Rich McNeary
How to Set Up Authentication for a React App with Auth0
Authentication is a critical part of any web application. It's important to ensure that user authentication is secure, scalable, and easy to manage.
In this blog post, we'll explore how to set up authentication with Auth0 in a React project. The @auth0/auth0-react SDK was recently updated to version 2.1.0, so that is the version we will be walking through. The process is the same for previous versions, but some of the props in the Auth0Provider have changed.
Christina Labay
Don’t Overload the API: Sequential & Batched Promises
The other day I was uploading a lot of content, including images, to a 3rd party service. I put together all my objects and mapped through them to fire off requests. Nearly immediately, I blew past the API rate limiter, and my requests started failing. Oops.
Ryan Spencer
Developer
React Native: 7 Common Questions Answered by a React Consulting Expert
Are you curious about using React Native for your next project? Whether it's an enterprise solution or a To-Do app, React Native might fit you. React Native is your one-stop solution for building applications for iOS and Android platforms using JavaScript while leveraging the benefits of React.
Akinyele Thompson
Level Up Your React Game with Remix, Prisma, & Supabase Postgres DB
Remix might be the hottest new framework in the React world right now. We’re ramping up on it and expecting to use it for more clients in the future. We like Remix for its speed and simplicity, but if that title drew you in, you probably already know that.
Ryan Spencer
Developer
5 Quick Tips for Writing More Readable React Code [ChatGPT Experiment]
ChatGPT is hot right now, so I thought I should experiment with letting it write a blog post. It did surprisingly well. The following is more than half AI-generated. For the most part, the first paragraph in each section is ChatGPT, and the more in-depth explanation and code examples are from me for added clarity. I also reordered the sections to flow better. Enjoy!
Ryan Spencer
Developer