Jun 5, 2022
Agreed, feature flags are better off as build time configuration. Using server props you lose static optimisation, and ultimately feature flags are either build time policy or an A/B Test. You could leverage beta middleware when dealing with a/b, but when all users are on the same toolset, there needs to be a strong case for managing flags in server props. If you are using ISR with revalidate timestamp, you can just cache the enabled flags in memory cache, as the page will be rebuilt eventually.