Skip to content

ching202/feature-toggle-demo

Repository files navigation

Feature Toggle Demo

This is a simple React project built with Vite that demonstrates conditional rendering using props.

Objective

The goal of this project is to create a reusable FeatureToggle component that displays a feature name when enabled and shows a disabled message when the feature is turned off.

Features

  • Built with React and Vite
  • Uses props for conditional rendering
  • No state management used
  • Includes normal and edge test cases

How It Works

The FeatureToggle component accepts two props:

  • isEnabled - a boolean value
  • featureName - a string value

Behavior

  • If isEnabled is true, the component renders the feature name
  • If isEnabled is false, the component renders: Feature [featureName] is disabled

How to Run

  1. Clone the repository
  2. Open the project folder in terminal
  3. Install dependencies:
npm install

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors