Skip to content

Work with feature toggles

In this section, you will learn how to use feature toggles with app-compose.
A feature toggle is a way to turn features on or off without changing the code.

With app-compose, you can control when a container starts based on the feature toggle.
You will see how to use the enable option to start or skip containers depending on the toggle.

This helps you manage features easily, test new things, and turn features on or off when needed.

Example

const isChefAvailable = () => false;
const chef = createContainer({
id: 'John Doe',
domain: 'italian-chef',
start: () => ({ api: null }),
enable: isChefAvailable,
});