Feature toggles, like a lot of other paradigms and patterns from the back-end are becoming popular in the front-end. However, the context to which they apply is very different.
A feature toggle in the back-end will not expose the toggled code to the customer until it is activated. In the front-end, unless the feature is loaded only after its activation, it will be delivered and at least partially exposed to the user. There are several ways to reduce the exposure, ranging from hiding the feature behind
display: none; to not executing the code.
The former will dirty up the DOM with hidden elements while the latter will still mean that you deliver dead code to the customer.
Please discuss how for you the advantages outweigh these drawbacks or not.
Level up every day