Our React/Redux JavaScript application has around 3000K lines of code and more active feature flags at any given moment than we have fingers and toes. As we have moved into a world of continuous deployment with controlled releases, the use of feature flags has become an essential way of writing software. Yet, when we started out, we ended up with code that was hard to read, hard to reason about, and hard to manage. After exploring several strategies, we have found a pattern that aligns feature flags with larger code units (components, reducers, actions) rather than at individual lines of code. This alleviates much of the pain that a naîve application of feature flags to a code base can introduce, restoring the development velocity we need. I’ll share what works for us and pass along some tips for right-sizing practices to your unique situation. While the focus here is on a React/Redux codebase, the principles will apply to any framework or technology.

Comments

Comments are closed.