Skip to content

configcat-labs/feature-flags-preact-sample-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Using Feature Flags in a Preact application

The application is a random food menu generator that chooses a soup, a main and a dessert from a list of predefined food items. In order to accomodate users that are sugarFree or wish to not consume sugar, it uses a feature flag (and ConfigCat feature flag management system) to eliminate the dessert option for those users with a SubscriptionType = sugarFree.

Setup and Run

  • Clone the repository
  • Open a terminal in the project folder
  • Run "npm run dev"
  • Open a new browser window with address: localhost:8080

Controlling the feature flag

  • Create a ConfigCat subscription
  • Add your own SDK key on line 44
  • Control the flag from ConfigCat Dashboard

Learn more

  • Consult the Preact official documentation here
  • Learn Preact with the official tutorial

ConfigCat also supports many other frameworks and languages. Check out the full list of supported SDKs here

You can also explore other code samples for various languages, frameworks, and topics here in the ConfigCat labs on GitHub.

Keep up with ConfigCat on Twitter, Facebook, LinkedIn, and GitHub.

Author

Roxana Halati

Contributions

Contributions are welcome!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published