This is a simple React project built with Vite that demonstrates conditional rendering using props.
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.
- Built with React and Vite
- Uses props for conditional rendering
- No state management used
- Includes normal and edge test cases
The FeatureToggle component accepts two props:
isEnabled- a boolean valuefeatureName- a string value
- If
isEnabledistrue, the component renders the feature name - If
isEnabledisfalse, the component renders:Feature [featureName] is disabled
- Clone the repository
- Open the project folder in terminal
- Install dependencies:
npm install