Sitemap
Frontend Digest

Anything and everything frontend. JavaScript, CSS and HTML.

Follow publication

Using Feature Flags in Next.js

10 min readSep 21, 2020

--

Press enter or click to view image in full size
Photo by Victor Grabarczyk on Unsplash

Releasing features into production can be quite the thrill. Surely you’ve tested the feature you’ve been working on locally to ensure that it works as expected. Or you might have even used a preview deployment to your staging environment, on which your PO or a dedicated testing team took the feature for a ride.

But there’s still this uncertainty when going live: Will it work in production?

And what do we do if it doesn’t?

This article shows how to use feature flags to release with confidence, and how to set feature flags up in Next.js.

Releasing with confidence

Feature Flags allow you to do many cool things. The most important for the topic at hand is that they allow you to define who can access new features. That way, you can publish features for your team members only.

They can then ensure the feature you’ve been working works as expected, before you turn the new feature on for everyone. And if you later discover something’s wrong, you can even turn the feature off for everyone.

This setup allows you to take your changes for a test ride before opening it up to your users. Feature Flags aren’t only useful for big releases, you can use the same…

--

--

Frontend Digest
Frontend Digest

Published in Frontend Digest

Anything and everything frontend. JavaScript, CSS and HTML.